macro_rules! magic_number {
    ($name:ident, $value:expr) => {
        const $name: u32 = $value;
    };
}
magic_number!(KEYC_BUILD_MODIFIERS, 0x10000000);
magic_number!(KEYC_VI, 0x20000000);
magic_number!(KEYC_SENT, 0x40000000);
magic_number!(KEYC_MASK_FLAGS, 0xff000000);

extern "C" {
    pub type _IO_wide_data;
    pub type _IO_codecvt;
    pub type _IO_marker;
    pub type event_base;
    pub type evbuffer;
    pub type bufferevent_ops;
    pub type args;
    pub type tmuxpeer;
    pub type hyperlinks;
    pub type screen_write_cline;
    pub type screen_sel;
    pub type screen_titles;
    pub type environ;
    pub type options;
    pub type format_tree;
    pub type input_ctx;
    pub type cmds;
    pub type tty_key;
    pub type tty_code;
    pub type format_job_tree;
    pub type control_state;
    pub type cmdq_list;
    pub type cmd;
    pub type cmdq_item;
    pub type options_array_item;
    pub type options_entry;
    pub type screen_write_citem;
    pub type paste_buffer;
    fn __errno_location() -> *mut i32;
    fn free(_: *mut ());
    fn qsort(__base: *mut (), __nmemb: size_t, __size: size_t, __compar: __compar_fn_t);
    fn memcpy(_: *mut (), _: *const (), _: u64) -> *mut ();
    fn memmove(_: *mut (), _: *const (), _: u64) -> *mut ();
    fn memset(_: *mut (), _: i32, _: u64) -> *mut ();
    fn strcmp(_: *const i8, _: *const i8) -> i32;
    fn strncmp(_: *const i8, _: *const i8, _: u64) -> i32;
    fn strchr(_: *const i8, _: i32) -> *mut i8;
    fn strlen(_: *const i8) -> u64;
    fn strerror(_: i32) -> *mut i8;
    fn strsep(__stringp: *mut *mut i8, __delim: *const i8) -> *mut i8;
    fn fputc(__c: i32, __stream: *mut FILE) -> i32;
    fn fputs(__s: *const i8, __stream: *mut FILE) -> i32;
    fn event_add(ev: *mut event, timeout: *const timeval) -> i32;
    fn event_del(_: *mut event) -> i32;
    fn event_initialized(ev: *const event) -> i32;
    fn event_set(
        _: *mut event,
        _: i32,
        _: i16,
        _: Option<unsafe extern "C" fn(i32, i16, *mut ()) -> ()>,
        _: *mut (),
    );
    fn fopen(_: *const i8, _: *const i8) -> *mut FILE;
    fn fclose(__stream: *mut FILE) -> i32;
    fn fgetln(_: *mut FILE, _: *mut size_t) -> *mut i8;
    fn xmalloc(_: size_t) -> *mut ();
    fn xcalloc(_: size_t, _: size_t) -> *mut ();
    fn xreallocarray(_: *mut (), _: size_t, _: size_t) -> *mut ();
    fn xstrdup(_: *const i8) -> *mut i8;
    fn xasprintf(_: *mut *mut i8, _: *const i8, _: ...) -> i32;
    fn xvasprintf(_: *mut *mut i8, _: *const i8, _: ::core::ffi::VaList) -> i32;
    fn xsnprintf(_: *mut i8, _: size_t, _: *const i8, _: ...) -> i32;
    static mut global_options: *mut options;
    static mut global_s_options: *mut options;
    fn find_home() -> *const i8;
    fn paste_buffer_data(_: *mut paste_buffer, _: *mut size_t) -> *const i8;
    fn paste_get_top(_: *mut *const i8) -> *mut paste_buffer;
    fn winlinks_RB_NEXT(_: *mut winlink) -> *mut winlink;
    fn options_get_only(_: *mut options, _: *const i8) -> *mut options_entry;
    fn options_get(_: *mut options, _: *const i8) -> *mut options_entry;
    fn options_array_get(_: *mut options_entry, _: u_int) -> *mut options_value;
    fn options_array_first(_: *mut options_entry) -> *mut options_array_item;
    fn options_array_next(_: *mut options_array_item) -> *mut options_array_item;
    fn options_array_item_value(_: *mut options_array_item) -> *mut options_value;
    fn options_get_string(_: *mut options, _: *const i8) -> *const i8;
    fn options_get_number(_: *mut options, _: *const i8) -> i64;
    static options_table: [options_table_entry; 0];
    static mut cmd_table: [*const cmd_entry; 0];
    fn cmdq_get_callback1(_: *const i8, _: cmdq_cb, _: *mut ()) -> *mut cmdq_item;
    fn cmdq_append(_: *mut client, _: *mut cmdq_item) -> *mut cmdq_item;
    fn key_string_lookup_key(_: key_code, _: i32) -> *const i8;
    static mut clients: clients;
    fn server_add_message(_: *const i8, _: ...);
    fn server_client_clear_overlay(_: *mut client);
    fn screen_init(_: *mut screen, _: u_int, _: u_int, _: u_int);
    fn screen_free(_: *mut screen);
    fn screen_write_stop(_: *mut screen_write_ctx);
    fn screen_write_cursormove(_: *mut screen_write_ctx, _: i32, _: i32, _: i32);
    fn screen_write_putc(_: *mut screen_write_ctx, _: *const grid_cell, _: u_char);
    fn screen_write_start(_: *mut screen_write_ctx, _: *mut screen);
    fn screen_resize(_: *mut screen, _: u_int, _: u_int, _: i32);
    fn grid_cells_equal(_: *const grid_cell, _: *const grid_cell) -> i32;
    fn format_width(_: *const i8) -> u_int;
    fn format_draw(
        _: *mut screen_write_ctx,
        _: *const grid_cell,
        _: u_int,
        _: *const i8,
        _: *mut style_ranges,
        _: i32,
    );
    fn format_defaults(
        _: *mut format_tree,
        _: *mut client,
        _: *mut session,
        _: *mut winlink,
        _: *mut window_pane,
    );
    fn grid_compare(_: *mut grid, _: *mut grid) -> i32;
    fn screen_write_nputs(
        _: *mut screen_write_ctx,
        _: ssize_t,
        _: *const grid_cell,
        _: *const i8,
        _: ...
    );
    fn screen_write_fast_copy(
        _: *mut screen_write_ctx,
        _: *mut screen,
        _: u_int,
        _: u_int,
        _: u_int,
        _: u_int,
    );
    fn screen_write_strlen(_: *const i8, _: ...) -> size_t;
    fn format_create_from_state(
        _: *mut cmdq_item,
        _: *mut client,
        _: *mut cmd_find_state,
    ) -> *mut format_tree;
    fn format_create_defaults(
        _: *mut cmdq_item,
        _: *mut client,
        _: *mut session,
        _: *mut winlink,
        _: *mut window_pane,
    ) -> *mut format_tree;
    fn screen_write_cell(_: *mut screen_write_ctx, _: *const grid_cell);
    fn screen_set_cursor_style(_: u_int, _: *mut screen_cursor_style, _: *mut i32);
    fn format_expand_time(_: *mut format_tree, _: *const i8) -> *mut i8;
    fn format_free(_: *mut format_tree);
    fn winlinks_RB_MINMAX(_: *mut winlinks, _: i32) -> *mut winlink;
    fn format_create(_: *mut client, _: *mut cmdq_item, _: i32, _: i32) -> *mut format_tree;
    fn sessions_RB_NEXT(_: *mut session) -> *mut session;
    static mut sessions: sessions;
    fn sessions_RB_MINMAX(_: *mut sessions, _: i32) -> *mut session;
    fn utf8_copy(_: *mut utf8_data, _: *const utf8_data);
    fn session_find(_: *const i8) -> *mut session;
    fn utf8_set(_: *mut utf8_data, _: u_char);
    fn utf8_to_data(_: utf8_char, _: *mut utf8_data);
    fn log_debug(_: *const i8, _: ...);
    fn utf8_tocstr(_: *mut utf8_data) -> *mut i8;
    fn fatalx(_: *const i8, _: ...) -> !;
    fn utf8_strwidth(_: *const utf8_data, _: ssize_t) -> u_int;
    fn utf8_append(_: *mut utf8_data, _: u_char) -> utf8_state;
    fn utf8_fromcstr(_: *const i8) -> *mut utf8_data;
    fn utf8_strlen(_: *const utf8_data) -> size_t;
    fn utf8_open(_: *mut utf8_data, _: u_char) -> utf8_state;
    fn utf8_cstrwidth(_: *const i8) -> u_int;
    fn menu_display(
        _: *mut menu,
        _: i32,
        _: i32,
        _: *mut cmdq_item,
        _: u_int,
        _: u_int,
        _: *mut client,
        _: box_lines,
        _: *const i8,
        _: *const i8,
        _: *const i8,
        _: *mut cmd_find_state,
        _: menu_choice_cb,
        _: *mut (),
    ) -> i32;
    fn menu_add_item(
        _: *mut menu,
        _: *const menu_item,
        _: *mut cmdq_item,
        _: *mut client,
        _: *mut cmd_find_state,
    );
    fn menu_create(_: *const i8) -> *mut menu;
    fn menu_free(_: *mut menu);
    fn style_apply(_: *mut grid_cell, _: *mut options, _: *const i8, _: *mut format_tree);
}
pub type __builtin_va_list = [__va_list_tag; 1];
#[derive(Copy, Clone)]
#[repr(C)]
pub struct __va_list_tag {
    pub gp_offset: u32,
    pub fp_offset: u32,
    pub overflow_arg_area: *mut (),
    pub reg_save_area: *mut (),
}
pub type __u_char = u8;
pub type __u_short = u16;
pub type __u_int = u32;
pub type __uint8_t = u8;
pub type __uint64_t = u64;
pub type __off_t = i64;
pub type __off64_t = i64;
pub type __pid_t = i32;
pub type __time_t = i64;
pub type __suseconds_t = i64;
pub type __ssize_t = i64;
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type pid_t = __pid_t;
pub type ssize_t = __ssize_t;
pub type time_t = __time_t;
pub type size_t = u64;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct timeval {
    pub tv_sec: __time_t,
    pub tv_usec: __suseconds_t,
}
pub type va_list = __builtin_va_list;
pub type __compar_fn_t =
    Option<unsafe extern "C" fn(*const (), *const ()) -> i32>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct _IO_FILE {
    pub _flags: i32,
    pub _IO_read_ptr: *mut i8,
    pub _IO_read_end: *mut i8,
    pub _IO_read_base: *mut i8,
    pub _IO_write_base: *mut i8,
    pub _IO_write_ptr: *mut i8,
    pub _IO_write_end: *mut i8,
    pub _IO_buf_base: *mut i8,
    pub _IO_buf_end: *mut i8,
    pub _IO_save_base: *mut i8,
    pub _IO_backup_base: *mut i8,
    pub _IO_save_end: *mut i8,
    pub _markers: *mut _IO_marker,
    pub _chain: *mut _IO_FILE,
    pub _fileno: i32,
    pub _flags2: i32,
    pub _old_offset: __off_t,
    pub _cur_column: u16,
    pub _vtable_offset: i8,
    pub _shortbuf: [i8; 1],
    pub _lock: *mut (),
    pub _offset: __off64_t,
    pub _codecvt: *mut _IO_codecvt,
    pub _wide_data: *mut _IO_wide_data,
    pub _freeres_list: *mut _IO_FILE,
    pub _freeres_buf: *mut (),
    pub __pad5: size_t,
    pub _mode: i32,
    pub _unused2: [i8; 20],
}
pub type _IO_lock_t = ();
pub type FILE = _IO_FILE;
pub type cc_t = u8;
pub type speed_t = u32;
pub type tcflag_t = u32;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct termios {
    pub c_iflag: tcflag_t,
    pub c_oflag: tcflag_t,
    pub c_cflag: tcflag_t,
    pub c_lflag: tcflag_t,
    pub c_line: cc_t,
    pub c_cc: [cc_t; 32],
    pub c_ispeed: speed_t,
    pub c_ospeed: speed_t,
}
pub type uint8_t = __uint8_t;
pub type uint64_t = __uint64_t;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event {
    pub ev_evcallback: event_callback,
    pub ev_timeout_pos: C2RustUnnamed_4,
    pub ev_fd: i32,
    pub ev_base: *mut event_base,
    pub ev_: C2RustUnnamed,
    pub ev_events: i16,
    pub ev_res: i16,
    pub ev_timeout: timeval,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed {
    pub ev_io: C2RustUnnamed_2,
    pub ev_signal: C2RustUnnamed_0,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_0 {
    pub ev_signal_next: C2RustUnnamed_1,
    pub ev_ncalls: i16,
    pub ev_pncalls: *mut i16,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_1 {
    pub le_next: *mut event,
    pub le_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_2 {
    pub ev_io_next: C2RustUnnamed_3,
    pub ev_timeout: timeval,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_3 {
    pub le_next: *mut event,
    pub le_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_4 {
    pub ev_next_with_common_timeout: C2RustUnnamed_5,
    pub min_heap_idx: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_5 {
    pub tqe_next: *mut event,
    pub tqe_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event_callback {
    pub evcb_active_next: C2RustUnnamed_7,
    pub evcb_flags: i16,
    pub evcb_pri: uint8_t,
    pub evcb_closure: uint8_t,
    pub evcb_cb_union: C2RustUnnamed_6,
    pub evcb_arg: *mut (),
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_6 {
    pub evcb_callback: Option<unsafe extern "C" fn(i32, i16, *mut ()) -> ()>,
    pub evcb_selfcb: Option<unsafe extern "C" fn(*mut event_callback, *mut ()) -> ()>,
    pub evcb_evfinalize: Option<unsafe extern "C" fn(*mut event, *mut ()) -> ()>,
    pub evcb_cbfinalize: Option<unsafe extern "C" fn(*mut event_callback, *mut ()) -> ()>,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_7 {
    pub tqe_next: *mut event_callback,
    pub tqe_prev: *mut *mut event_callback,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct bufferevent {
    pub ev_base: *mut event_base,
    pub be_ops: *const bufferevent_ops,
    pub ev_read: event,
    pub ev_write: event,
    pub input: *mut evbuffer,
    pub output: *mut evbuffer,
    pub wm_read: event_watermark,
    pub wm_write: event_watermark,
    pub readcb: bufferevent_data_cb,
    pub writecb: bufferevent_data_cb,
    pub errorcb: bufferevent_event_cb,
    pub cbarg: *mut (),
    pub timeout_read: timeval,
    pub timeout_write: timeval,
    pub enabled: i16,
}
pub type bufferevent_event_cb =
    Option<unsafe extern "C" fn(*mut bufferevent, i16, *mut ()) -> ()>;
pub type bufferevent_data_cb =
    Option<unsafe extern "C" fn(*mut bufferevent, *mut ()) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event_watermark {
    pub low: size_t,
    pub high: size_t,
}
pub type bitstr_t = u8;
pub type msgtype = u32;
pub const MSG_READ_CANCEL: msgtype = 307;
pub const MSG_WRITE_CLOSE: msgtype = 306;
pub const MSG_WRITE_READY: msgtype = 305;
pub const MSG_WRITE: msgtype = 304;
pub const MSG_WRITE_OPEN: msgtype = 303;
pub const MSG_READ_DONE: msgtype = 302;
pub const MSG_READ: msgtype = 301;
pub const MSG_READ_OPEN: msgtype = 300;
pub const MSG_FLAGS: msgtype = 218;
pub const MSG_EXEC: msgtype = 217;
pub const MSG_WAKEUP: msgtype = 216;
pub const MSG_UNLOCK: msgtype = 215;
pub const MSG_SUSPEND: msgtype = 214;
pub const MSG_OLDSTDOUT: msgtype = 213;
pub const MSG_OLDSTDIN: msgtype = 212;
pub const MSG_OLDSTDERR: msgtype = 211;
pub const MSG_SHUTDOWN: msgtype = 210;
pub const MSG_SHELL: msgtype = 209;
pub const MSG_RESIZE: msgtype = 208;
pub const MSG_READY: msgtype = 207;
pub const MSG_LOCK: msgtype = 206;
pub const MSG_EXITING: msgtype = 205;
pub const MSG_EXITED: msgtype = 204;
pub const MSG_EXIT: msgtype = 203;
pub const MSG_DETACHKILL: msgtype = 202;
pub const MSG_DETACH: msgtype = 201;
pub const MSG_COMMAND: msgtype = 200;
pub const MSG_IDENTIFY_TERMINFO: msgtype = 112;
pub const MSG_IDENTIFY_LONGFLAGS: msgtype = 111;
pub const MSG_IDENTIFY_STDOUT: msgtype = 110;
pub const MSG_IDENTIFY_FEATURES: msgtype = 109;
pub const MSG_IDENTIFY_CWD: msgtype = 108;
pub const MSG_IDENTIFY_CLIENTPID: msgtype = 107;
pub const MSG_IDENTIFY_DONE: msgtype = 106;
pub const MSG_IDENTIFY_ENVIRON: msgtype = 105;
pub const MSG_IDENTIFY_STDIN: msgtype = 104;
pub const MSG_IDENTIFY_OLDCWD: msgtype = 103;
pub const MSG_IDENTIFY_TTYNAME: msgtype = 102;
pub const MSG_IDENTIFY_TERM: msgtype = 101;
pub const MSG_IDENTIFY_FLAGS: msgtype = 100;
pub const MSG_VERSION: msgtype = 12;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client {
    pub name: *const i8,
    pub peer: *mut tmuxpeer,
    pub queue: *mut cmdq_list,
    pub windows: client_windows,
    pub control_state: *mut control_state,
    pub pause_age: u_int,
    pub pid: pid_t,
    pub fd: i32,
    pub out_fd: i32,
    pub event: event,
    pub retval: i32,
    pub creation_time: timeval,
    pub activity_time: timeval,
    pub last_activity_time: timeval,
    pub environ: *mut environ,
    pub jobs: *mut format_job_tree,
    pub title: *mut i8,
    pub path: *mut i8,
    pub cwd: *const i8,
    pub term_name: *mut i8,
    pub term_features: i32,
    pub term_type: *mut i8,
    pub term_caps: *mut *mut i8,
    pub term_ncaps: u_int,
    pub ttyname: *mut i8,
    pub tty: tty,
    pub written: size_t,
    pub discarded: size_t,
    pub redraw: size_t,
    pub repeat_timer: event,
    pub click_timer: event,
    pub click_button: u_int,
    pub click_event: mouse_event,
    pub status: status_line,
    pub flags: uint64_t,
    pub exit_type: C2RustUnnamed_30,
    pub exit_msgtype: msgtype,
    pub exit_session: *mut i8,
    pub exit_message: *mut i8,
    pub keytable: *mut key_table,
    pub last_key: key_code,
    pub redraw_panes: uint64_t,
    pub redraw_scrollbars: uint64_t,
    pub message_ignore_keys: i32,
    pub message_ignore_styles: i32,
    pub message_string: *mut i8,
    pub message_timer: event,
    pub prompt_string: *mut i8,
    pub prompt_buffer: *mut utf8_data,
    pub prompt_last: *mut i8,
    pub prompt_index: size_t,
    pub prompt_inputcb: prompt_input_cb,
    pub prompt_freecb: prompt_free_cb,
    pub prompt_data: *mut (),
    pub prompt_hindex: [u_int; 4],
    pub prompt_mode: C2RustUnnamed_27,
    pub prompt_saved: *mut utf8_data,
    pub prompt_flags: i32,
    pub prompt_type: prompt_type,
    pub prompt_cursor: i32,
    pub session: *mut session,
    pub last_session: *mut session,
    pub references: i32,
    pub pan_window: *mut (),
    pub pan_ox: u_int,
    pub pan_oy: u_int,
    pub overlay_check: overlay_check_cb,
    pub overlay_mode: overlay_mode_cb,
    pub overlay_draw: overlay_draw_cb,
    pub overlay_key: overlay_key_cb,
    pub overlay_free: overlay_free_cb,
    pub overlay_resize: overlay_resize_cb,
    pub overlay_data: *mut (),
    pub overlay_timer: event,
    pub files: client_files,
    pub clipboard_panes: *mut u_int,
    pub clipboard_npanes: u_int,
    pub entry: C2RustUnnamed_8,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_8 {
    pub tqe_next: *mut client,
    pub tqe_prev: *mut *mut client,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_files {
    pub rbh_root: *mut client_file,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_file {
    pub c: *mut client,
    pub peer: *mut tmuxpeer,
    pub tree: *mut client_files,
    pub references: i32,
    pub stream: i32,
    pub path: *mut i8,
    pub buffer: *mut evbuffer,
    pub event: *mut bufferevent,
    pub fd: i32,
    pub error: i32,
    pub closed: i32,
    pub cb: client_file_cb,
    pub data: *mut (),
    pub entry: C2RustUnnamed_9,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_9 {
    pub rbe_left: *mut client_file,
    pub rbe_right: *mut client_file,
    pub rbe_parent: *mut client_file,
    pub rbe_color: i32,
}
pub type client_file_cb = Option<
    unsafe extern "C" fn(*mut client, *const i8, i32, i32, *mut evbuffer, *mut ()) -> (),
>;
pub type overlay_resize_cb = Option<unsafe extern "C" fn(*mut client, *mut ()) -> ()>;
pub type overlay_free_cb = Option<unsafe extern "C" fn(*mut client, *mut ()) -> ()>;
pub type overlay_key_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *mut key_event) -> i32>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_event {
    pub key: key_code,
    pub m: mouse_event,
    pub buf: *mut i8,
    pub len: size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct mouse_event {
    pub valid: i32,
    pub ignore: i32,
    pub key: key_code,
    pub statusat: i32,
    pub statuslines: u_int,
    pub x: u_int,
    pub y: u_int,
    pub b: u_int,
    pub lx: u_int,
    pub ly: u_int,
    pub lb: u_int,
    pub ox: u_int,
    pub oy: u_int,
    pub s: i32,
    pub w: i32,
    pub wp: i32,
    pub sgr_type: u_int,
    pub sgr_b: u_int,
}
pub type key_code = u64;
pub type overlay_draw_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *mut screen_redraw_ctx) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct screen_redraw_ctx {
    pub c: *mut client,
    pub statuslines: u_int,
    pub statustop: i32,
    pub pane_status: i32,
    pub pane_lines: pane_lines,
    pub pane_scrollbars: i32,
    pub pane_scrollbars_pos: i32,
    pub no_pane_gc: grid_cell,
    pub no_pane_gc_set: i32,
    pub sx: u_int,
    pub sy: u_int,
    pub ox: u_int,
    pub oy: u_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid_cell {
    pub data: utf8_data,
    pub attr: u_short,
    pub flags: u_char,
    pub fg: i32,
    pub bg: i32,
    pub us: i32,
    pub link: u_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct utf8_data {
    pub data: [u_char; 21],
    pub have: u_char,
    pub size: u_char,
    pub width: u_char,
}
pub type pane_lines = u32;
pub const PANE_LINES_NUMBER: pane_lines = 4;
pub const PANE_LINES_SIMPLE: pane_lines = 3;
pub const PANE_LINES_HEAVY: pane_lines = 2;
pub const PANE_LINES_DOUBLE: pane_lines = 1;
pub const PANE_LINES_SINGLE: pane_lines = 0;
pub type overlay_mode_cb = Option<
    unsafe extern "C" fn(*mut client, *mut (), *mut u_int, *mut u_int) -> *mut screen,
>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct screen {
    pub title: *mut i8,
    pub path: *mut i8,
    pub titles: *mut screen_titles,
    pub grid: *mut grid,
    pub cx: u_int,
    pub cy: u_int,
    pub cstyle: screen_cursor_style,
    pub default_cstyle: screen_cursor_style,
    pub ccolour: i32,
    pub default_ccolour: i32,
    pub rupper: u_int,
    pub rlower: u_int,
    pub mode: i32,
    pub default_mode: i32,
    pub saved_cx: u_int,
    pub saved_cy: u_int,
    pub saved_grid: *mut grid,
    pub saved_cell: grid_cell,
    pub saved_flags: i32,
    pub tabs: *mut bitstr_t,
    pub sel: *mut screen_sel,
    pub write_list: *mut screen_write_cline,
    pub hyperlinks: *mut hyperlinks,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid {
    pub flags: i32,
    pub sx: u_int,
    pub sy: u_int,
    pub hscrolled: u_int,
    pub hsize: u_int,
    pub hlimit: u_int,
    pub linedata: *mut grid_line,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid_line {
    pub celldata: *mut grid_cell_entry,
    pub cellused: u_int,
    pub cellsize: u_int,
    pub extddata: *mut grid_extd_entry,
    pub extdsize: u_int,
    pub flags: i32,
    pub time: time_t,
}
#[derive(Copy, Clone)]
#[repr(C, packed)]
pub struct grid_extd_entry {
    pub data: utf8_char,
    pub attr: u_short,
    pub flags: u_char,
    pub fg: i32,
    pub bg: i32,
    pub us: i32,
    pub link: u_int,
}
pub type utf8_char = u_int;
#[derive(Copy, Clone)]
#[repr(C, packed)]
pub struct grid_cell_entry {
    pub c2rust_unnamed: C2RustUnnamed_10,
    pub flags: u_char,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_10 {
    pub offset: u_int,
    pub data: C2RustUnnamed_11,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_11 {
    pub attr: u_char,
    pub fg: u_char,
    pub bg: u_char,
    pub data: u_char,
}
pub type screen_cursor_style = u32;
pub const SCREEN_CURSOR_BAR: screen_cursor_style = 3;
pub const SCREEN_CURSOR_UNDERLINE: screen_cursor_style = 2;
pub const SCREEN_CURSOR_BLOCK: screen_cursor_style = 1;
pub const SCREEN_CURSOR_DEFAULT: screen_cursor_style = 0;
pub type overlay_check_cb = Option<
    unsafe extern "C" fn(
        *mut client,
        *mut (),
        u_int,
        u_int,
        u_int,
        *mut overlay_ranges,
    ) -> (),
>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct overlay_ranges {
    pub px: [u_int; 3],
    pub nx: [u_int; 3],
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct session {
    pub id: u_int,
    pub name: *mut i8,
    pub cwd: *const i8,
    pub creation_time: timeval,
    pub last_attached_time: timeval,
    pub activity_time: timeval,
    pub last_activity_time: timeval,
    pub lock_timer: event,
    pub curw: *mut winlink,
    pub lastw: winlink_stack,
    pub windows: winlinks,
    pub statusat: i32,
    pub statuslines: u_int,
    pub options: *mut options,
    pub flags: i32,
    pub attached: u_int,
    pub tio: *mut termios,
    pub environ: *mut environ,
    pub references: i32,
    pub gentry: C2RustUnnamed_13,
    pub entry: C2RustUnnamed_12,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_12 {
    pub rbe_left: *mut session,
    pub rbe_right: *mut session,
    pub rbe_parent: *mut session,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_13 {
    pub tqe_next: *mut session,
    pub tqe_prev: *mut *mut session,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlinks {
    pub rbh_root: *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlink {
    pub idx: i32,
    pub session: *mut session,
    pub window: *mut window,
    pub flags: i32,
    pub entry: C2RustUnnamed_16,
    pub wentry: C2RustUnnamed_15,
    pub sentry: C2RustUnnamed_14,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_14 {
    pub tqe_next: *mut winlink,
    pub tqe_prev: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_15 {
    pub tqe_next: *mut winlink,
    pub tqe_prev: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_16 {
    pub rbe_left: *mut winlink,
    pub rbe_right: *mut winlink,
    pub rbe_parent: *mut winlink,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window {
    pub id: u_int,
    pub latest: *mut (),
    pub name: *mut i8,
    pub name_event: event,
    pub name_time: timeval,
    pub alerts_timer: event,
    pub offset_timer: event,
    pub activity_time: timeval,
    pub active: *mut window_pane,
    pub last_panes: window_panes,
    pub panes: window_panes,
    pub lastlayout: i32,
    pub layout_root: *mut layout_cell,
    pub saved_layout_root: *mut layout_cell,
    pub old_layout: *mut i8,
    pub sx: u_int,
    pub sy: u_int,
    pub manual_sx: u_int,
    pub manual_sy: u_int,
    pub xpixel: u_int,
    pub ypixel: u_int,
    pub new_sx: u_int,
    pub new_sy: u_int,
    pub new_xpixel: u_int,
    pub new_ypixel: u_int,
    pub fill_character: *mut utf8_data,
    pub flags: i32,
    pub alerts_queued: i32,
    pub alerts_entry: C2RustUnnamed_19,
    pub options: *mut options,
    pub references: u_int,
    pub winlinks: C2RustUnnamed_18,
    pub entry: C2RustUnnamed_17,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_17 {
    pub rbe_left: *mut window,
    pub rbe_right: *mut window,
    pub rbe_parent: *mut window,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_18 {
    pub tqh_first: *mut winlink,
    pub tqh_last: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_19 {
    pub tqe_next: *mut window,
    pub tqe_prev: *mut *mut window,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct layout_cell {
    pub type_0: layout_type,
    pub parent: *mut layout_cell,
    pub sx: u_int,
    pub sy: u_int,
    pub xoff: u_int,
    pub yoff: u_int,
    pub wp: *mut window_pane,
    pub cells: layout_cells,
    pub entry: C2RustUnnamed_20,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_20 {
    pub tqe_next: *mut layout_cell,
    pub tqe_prev: *mut *mut layout_cell,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct layout_cells {
    pub tqh_first: *mut layout_cell,
    pub tqh_last: *mut *mut layout_cell,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane {
    pub id: u_int,
    pub active_point: u_int,
    pub window: *mut window,
    pub options: *mut options,
    pub layout_cell: *mut layout_cell,
    pub saved_layout_cell: *mut layout_cell,
    pub sx: u_int,
    pub sy: u_int,
    pub xoff: u_int,
    pub yoff: u_int,
    pub flags: i32,
    pub sb_slider_y: u_int,
    pub sb_slider_h: u_int,
    pub argc: i32,
    pub argv: *mut *mut i8,
    pub shell: *mut i8,
    pub cwd: *mut i8,
    pub pid: pid_t,
    pub tty: [i8; 32],
    pub status: i32,
    pub dead_time: timeval,
    pub fd: i32,
    pub event: *mut bufferevent,
    pub offset: window_pane_offset,
    pub base_offset: size_t,
    pub resize_queue: window_pane_resizes,
    pub resize_timer: event,
    pub ictx: *mut input_ctx,
    pub cached_gc: grid_cell,
    pub cached_active_gc: grid_cell,
    pub palette: colour_palette,
    pub pipe_fd: i32,
    pub pipe_event: *mut bufferevent,
    pub pipe_offset: window_pane_offset,
    pub screen: *mut screen,
    pub base: screen,
    pub status_screen: screen,
    pub status_size: size_t,
    pub modes: C2RustUnnamed_24,
    pub searchstr: *mut i8,
    pub searchregex: i32,
    pub border_gc_set: i32,
    pub border_gc: grid_cell,
    pub control_bg: i32,
    pub control_fg: i32,
    pub scrollbar_style: style,
    pub entry: C2RustUnnamed_23,
    pub sentry: C2RustUnnamed_22,
    pub tree_entry: C2RustUnnamed_21,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_21 {
    pub rbe_left: *mut window_pane,
    pub rbe_right: *mut window_pane,
    pub rbe_parent: *mut window_pane,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_22 {
    pub tqe_next: *mut window_pane,
    pub tqe_prev: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_23 {
    pub tqe_next: *mut window_pane,
    pub tqe_prev: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style {
    pub gc: grid_cell,
    pub ignore: i32,
    pub fill: i32,
    pub align: style_align,
    pub list: style_list,
    pub range_type: style_range_type,
    pub range_argument: u_int,
    pub range_string: [i8; 16],
    pub width: i32,
    pub pad: i32,
    pub default_type: style_default_type,
}
pub type style_default_type = u32;
pub const STYLE_DEFAULT_POP: style_default_type = 2;
pub const STYLE_DEFAULT_PUSH: style_default_type = 1;
pub const STYLE_DEFAULT_BASE: style_default_type = 0;
pub type style_range_type = u32;
pub const STYLE_RANGE_USER: style_range_type = 6;
pub const STYLE_RANGE_SESSION: style_range_type = 5;
pub const STYLE_RANGE_WINDOW: style_range_type = 4;
pub const STYLE_RANGE_PANE: style_range_type = 3;
pub const STYLE_RANGE_RIGHT: style_range_type = 2;
pub const STYLE_RANGE_LEFT: style_range_type = 1;
pub const STYLE_RANGE_NONE: style_range_type = 0;
pub type style_list = u32;
pub const STYLE_LIST_RIGHT_MARKER: style_list = 4;
pub const STYLE_LIST_LEFT_MARKER: style_list = 3;
pub const STYLE_LIST_FOCUS: style_list = 2;
pub const STYLE_LIST_ON: style_list = 1;
pub const STYLE_LIST_OFF: style_list = 0;
pub type style_align = u32;
pub const STYLE_ALIGN_ABSOLUTE_CENTRE: style_align = 4;
pub const STYLE_ALIGN_RIGHT: style_align = 3;
pub const STYLE_ALIGN_CENTRE: style_align = 2;
pub const STYLE_ALIGN_LEFT: style_align = 1;
pub const STYLE_ALIGN_DEFAULT: style_align = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_24 {
    pub tqh_first: *mut window_mode_entry,
    pub tqh_last: *mut *mut window_mode_entry,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_mode_entry {
    pub wp: *mut window_pane,
    pub swp: *mut window_pane,
    pub mode: *const window_mode,
    pub data: *mut (),
    pub screen: *mut screen,
    pub prefix: u_int,
    pub entry: C2RustUnnamed_25,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_25 {
    pub tqe_next: *mut window_mode_entry,
    pub tqe_prev: *mut *mut window_mode_entry,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_mode {
    pub name: *const i8,
    pub default_format: *const i8,
    pub init: Option<
        unsafe extern "C" fn(*mut window_mode_entry, *mut cmd_find_state, *mut args) -> *mut screen,
    >,
    pub free: Option<unsafe extern "C" fn(*mut window_mode_entry) -> ()>,
    pub resize: Option<unsafe extern "C" fn(*mut window_mode_entry, u_int, u_int) -> ()>,
    pub update: Option<unsafe extern "C" fn(*mut window_mode_entry) -> ()>,
    pub key: Option<
        unsafe extern "C" fn(
            *mut window_mode_entry,
            *mut client,
            *mut session,
            *mut winlink,
            key_code,
            *mut mouse_event,
        ) -> (),
    >,
    pub key_table: Option<unsafe extern "C" fn(*mut window_mode_entry) -> *const i8>,
    pub command: Option<
        unsafe extern "C" fn(
            *mut window_mode_entry,
            *mut client,
            *mut session,
            *mut winlink,
            *mut args,
            *mut mouse_event,
        ) -> (),
    >,
    pub formats: Option<unsafe extern "C" fn(*mut window_mode_entry, *mut format_tree) -> ()>,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_find_state {
    pub flags: i32,
    pub current: *mut cmd_find_state,
    pub s: *mut session,
    pub wl: *mut winlink,
    pub w: *mut window,
    pub wp: *mut window_pane,
    pub idx: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_offset {
    pub used: size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct colour_palette {
    pub fg: i32,
    pub bg: i32,
    pub palette: *mut i32,
    pub default_palette: *mut i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_resizes {
    pub tqh_first: *mut window_pane_resize,
    pub tqh_last: *mut *mut window_pane_resize,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_resize {
    pub sx: u_int,
    pub sy: u_int,
    pub osx: u_int,
    pub osy: u_int,
    pub entry: C2RustUnnamed_26,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_26 {
    pub tqe_next: *mut window_pane_resize,
    pub tqe_prev: *mut *mut window_pane_resize,
}
pub type layout_type = u32;
pub const LAYOUT_WINDOWPANE: layout_type = 2;
pub const LAYOUT_TOPBOTTOM: layout_type = 1;
pub const LAYOUT_LEFTRIGHT: layout_type = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_panes {
    pub tqh_first: *mut window_pane,
    pub tqh_last: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlink_stack {
    pub tqh_first: *mut winlink,
    pub tqh_last: *mut *mut winlink,
}
pub type prompt_type = u32;
pub const PROMPT_TYPE_INVALID: prompt_type = 255;
pub const PROMPT_TYPE_WINDOW_TARGET: prompt_type = 3;
pub const PROMPT_TYPE_TARGET: prompt_type = 2;
pub const PROMPT_TYPE_SEARCH: prompt_type = 1;
pub const PROMPT_TYPE_COMMAND: prompt_type = 0;
pub type C2RustUnnamed_27 = u32;
pub const PROMPT_COMMAND: C2RustUnnamed_27 = 1;
pub const PROMPT_ENTRY: C2RustUnnamed_27 = 0;
pub type prompt_free_cb = Option<unsafe extern "C" fn(*mut ()) -> ()>;
pub type prompt_input_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *const i8, i32) -> i32>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_table {
    pub name: *const i8,
    pub activity_time: timeval,
    pub key_bindings: key_bindings,
    pub default_key_bindings: key_bindings,
    pub references: u_int,
    pub entry: C2RustUnnamed_28,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_28 {
    pub rbe_left: *mut key_table,
    pub rbe_right: *mut key_table,
    pub rbe_parent: *mut key_table,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_bindings {
    pub rbh_root: *mut key_binding,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_binding {
    pub key: key_code,
    pub cmdlist: *mut cmd_list,
    pub note: *const i8,
    pub flags: i32,
    pub entry: C2RustUnnamed_29,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_29 {
    pub rbe_left: *mut key_binding,
    pub rbe_right: *mut key_binding,
    pub rbe_parent: *mut key_binding,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_list {
    pub references: i32,
    pub group: u_int,
    pub list: *mut cmds,
}
pub type C2RustUnnamed_30 = u32;
pub const CLIENT_EXIT_DETACH: C2RustUnnamed_30 = 2;
pub const CLIENT_EXIT_SHUTDOWN: C2RustUnnamed_30 = 1;
pub const CLIENT_EXIT_RETURN: C2RustUnnamed_30 = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct status_line {
    pub timer: event,
    pub screen: screen,
    pub active: *mut screen,
    pub references: i32,
    pub style: grid_cell,
    pub entries: [status_line_entry; 5],
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct status_line_entry {
    pub expanded: *mut i8,
    pub ranges: style_ranges,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style_ranges {
    pub tqh_first: *mut style_range,
    pub tqh_last: *mut *mut style_range,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style_range {
    pub type_0: style_range_type,
    pub argument: u_int,
    pub string: [i8; 16],
    pub start: u_int,
    pub end: u_int,
    pub entry: C2RustUnnamed_31,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_31 {
    pub tqe_next: *mut style_range,
    pub tqe_prev: *mut *mut style_range,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty {
    pub client: *mut client,
    pub start_timer: event,
    pub clipboard_timer: event,
    pub last_requests: time_t,
    pub sx: u_int,
    pub sy: u_int,
    pub xpixel: u_int,
    pub ypixel: u_int,
    pub cx: u_int,
    pub cy: u_int,
    pub cstyle: screen_cursor_style,
    pub ccolour: i32,
    pub oflag: i32,
    pub oox: u_int,
    pub ooy: u_int,
    pub osx: u_int,
    pub osy: u_int,
    pub mode: i32,
    pub fg: i32,
    pub bg: i32,
    pub rlower: u_int,
    pub rupper: u_int,
    pub rleft: u_int,
    pub rright: u_int,
    pub event_in: event,
    pub in_0: *mut evbuffer,
    pub event_out: event,
    pub out: *mut evbuffer,
    pub timer: event,
    pub discarded: size_t,
    pub tio: termios,
    pub cell: grid_cell,
    pub last_cell: grid_cell,
    pub flags: i32,
    pub term: *mut tty_term,
    pub mouse_last_x: u_int,
    pub mouse_last_y: u_int,
    pub mouse_last_b: u_int,
    pub mouse_drag_flag: i32,
    pub mouse_scrolling_flag: i32,
    pub mouse_slider_mpos: i32,
    pub mouse_drag_update: Option<unsafe extern "C" fn(*mut client, *mut mouse_event) -> ()>,
    pub mouse_drag_release: Option<unsafe extern "C" fn(*mut client, *mut mouse_event) -> ()>,
    pub key_timer: event,
    pub key_tree: *mut tty_key,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_term {
    pub name: *mut i8,
    pub tty: *mut tty,
    pub features: i32,
    pub acs: [[i8; 2]; 256],
    pub codes: *mut tty_code,
    pub flags: i32,
    pub entry: C2RustUnnamed_32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_32 {
    pub le_next: *mut tty_term,
    pub le_prev: *mut *mut tty_term,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_windows {
    pub rbh_root: *mut client_window,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_window {
    pub window: u_int,
    pub pane: *mut window_pane,
    pub sx: u_int,
    pub sy: u_int,
    pub entry: C2RustUnnamed_33,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_33 {
    pub rbe_left: *mut client_window,
    pub rbe_right: *mut client_window,
    pub rbe_parent: *mut client_window,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct screen_write_ctx {
    pub wp: *mut window_pane,
    pub s: *mut screen,
    pub flags: i32,
    pub init_ctx_cb: screen_write_init_ctx_cb,
    pub arg: *mut (),
    pub item: *mut screen_write_citem,
    pub scrolled: u_int,
    pub bg: u_int,
}
pub type screen_write_init_ctx_cb =
    Option<unsafe extern "C" fn(*mut screen_write_ctx, *mut tty_ctx) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_ctx {
    pub s: *mut screen,
    pub redraw_cb: tty_ctx_redraw_cb,
    pub set_client_cb: tty_ctx_set_client_cb,
    pub arg: *mut (),
    pub cell: *const grid_cell,
    pub wrapped: i32,
    pub num: u_int,
    pub ptr: *mut (),
    pub ptr2: *mut (),
    pub allow_invisible_panes: i32,
    pub ocx: u_int,
    pub ocy: u_int,
    pub orupper: u_int,
    pub orlower: u_int,
    pub xoff: u_int,
    pub yoff: u_int,
    pub rxoff: u_int,
    pub ryoff: u_int,
    pub sx: u_int,
    pub sy: u_int,
    pub bg: u_int,
    pub defaults: grid_cell,
    pub palette: *mut colour_palette,
    pub bigger: i32,
    pub wox: u_int,
    pub woy: u_int,
    pub wsx: u_int,
    pub wsy: u_int,
}
pub type tty_ctx_set_client_cb = Option<unsafe extern "C" fn(*mut tty_ctx, *mut client) -> i32>;
pub type tty_ctx_redraw_cb = Option<unsafe extern "C" fn(*const tty_ctx) -> ()>;
pub type C2RustUnnamed_34 = u32;
pub const KEYC_BASE_END: C2RustUnnamed_34 = 1106562;
pub const KEYC_KP_PERIOD: C2RustUnnamed_34 = 1106561;
pub const KEYC_KP_ZERO: C2RustUnnamed_34 = 1106560;
pub const KEYC_KP_ENTER: C2RustUnnamed_34 = 1106559;
pub const KEYC_KP_THREE: C2RustUnnamed_34 = 1106558;
pub const KEYC_KP_TWO: C2RustUnnamed_34 = 1106557;
pub const KEYC_KP_ONE: C2RustUnnamed_34 = 1106556;
pub const KEYC_KP_SIX: C2RustUnnamed_34 = 1106555;
pub const KEYC_KP_FIVE: C2RustUnnamed_34 = 1106554;
pub const KEYC_KP_FOUR: C2RustUnnamed_34 = 1106553;
pub const KEYC_KP_PLUS: C2RustUnnamed_34 = 1106552;
pub const KEYC_KP_NINE: C2RustUnnamed_34 = 1106551;
pub const KEYC_KP_EIGHT: C2RustUnnamed_34 = 1106550;
pub const KEYC_KP_SEVEN: C2RustUnnamed_34 = 1106549;
pub const KEYC_KP_MINUS: C2RustUnnamed_34 = 1106548;
pub const KEYC_KP_STAR: C2RustUnnamed_34 = 1106547;
pub const KEYC_KP_SLASH: C2RustUnnamed_34 = 1106546;
pub const KEYC_RIGHT: C2RustUnnamed_34 = 1106545;
pub const KEYC_LEFT: C2RustUnnamed_34 = 1106544;
pub const KEYC_DOWN: C2RustUnnamed_34 = 1106543;
pub const KEYC_UP: C2RustUnnamed_34 = 1106542;
pub const KEYC_BTAB: C2RustUnnamed_34 = 1106541;
pub const KEYC_PPAGE: C2RustUnnamed_34 = 1106540;
pub const KEYC_NPAGE: C2RustUnnamed_34 = 1106539;
pub const KEYC_END: C2RustUnnamed_34 = 1106538;
pub const KEYC_HOME: C2RustUnnamed_34 = 1106537;
pub const KEYC_DC: C2RustUnnamed_34 = 1106536;
pub const KEYC_IC: C2RustUnnamed_34 = 1106535;
pub const KEYC_F12: C2RustUnnamed_34 = 1106534;
pub const KEYC_F11: C2RustUnnamed_34 = 1106533;
pub const KEYC_F10: C2RustUnnamed_34 = 1106532;
pub const KEYC_F9: C2RustUnnamed_34 = 1106531;
pub const KEYC_F8: C2RustUnnamed_34 = 1106530;
pub const KEYC_F7: C2RustUnnamed_34 = 1106529;
pub const KEYC_F6: C2RustUnnamed_34 = 1106528;
pub const KEYC_F5: C2RustUnnamed_34 = 1106527;
pub const KEYC_F4: C2RustUnnamed_34 = 1106526;
pub const KEYC_F3: C2RustUnnamed_34 = 1106525;
pub const KEYC_F2: C2RustUnnamed_34 = 1106524;
pub const KEYC_F1: C2RustUnnamed_34 = 1106523;
pub const KEYC_BSPACE: C2RustUnnamed_34 = 1106522;
pub const KEYC_TRIPLECLICK11_BORDER: C2RustUnnamed_34 = 1106521;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106520;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106519;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106518;
pub const KEYC_TRIPLECLICK11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106517;
pub const KEYC_TRIPLECLICK11_STATUS_RIGHT: C2RustUnnamed_34 = 1106516;
pub const KEYC_TRIPLECLICK11_STATUS_LEFT: C2RustUnnamed_34 = 1106515;
pub const KEYC_TRIPLECLICK11_STATUS: C2RustUnnamed_34 = 1106514;
pub const KEYC_TRIPLECLICK11_PANE: C2RustUnnamed_34 = 1106513;
pub const KEYC_TRIPLECLICK10_BORDER: C2RustUnnamed_34 = 1106512;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106511;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106510;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106509;
pub const KEYC_TRIPLECLICK10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106508;
pub const KEYC_TRIPLECLICK10_STATUS_RIGHT: C2RustUnnamed_34 = 1106507;
pub const KEYC_TRIPLECLICK10_STATUS_LEFT: C2RustUnnamed_34 = 1106506;
pub const KEYC_TRIPLECLICK10_STATUS: C2RustUnnamed_34 = 1106505;
pub const KEYC_TRIPLECLICK10_PANE: C2RustUnnamed_34 = 1106504;
pub const KEYC_TRIPLECLICK9_BORDER: C2RustUnnamed_34 = 1106503;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106502;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106501;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106500;
pub const KEYC_TRIPLECLICK9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106499;
pub const KEYC_TRIPLECLICK9_STATUS_RIGHT: C2RustUnnamed_34 = 1106498;
pub const KEYC_TRIPLECLICK9_STATUS_LEFT: C2RustUnnamed_34 = 1106497;
pub const KEYC_TRIPLECLICK9_STATUS: C2RustUnnamed_34 = 1106496;
pub const KEYC_TRIPLECLICK9_PANE: C2RustUnnamed_34 = 1106495;
pub const KEYC_TRIPLECLICK8_BORDER: C2RustUnnamed_34 = 1106494;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106493;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106492;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106491;
pub const KEYC_TRIPLECLICK8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106490;
pub const KEYC_TRIPLECLICK8_STATUS_RIGHT: C2RustUnnamed_34 = 1106489;
pub const KEYC_TRIPLECLICK8_STATUS_LEFT: C2RustUnnamed_34 = 1106488;
pub const KEYC_TRIPLECLICK8_STATUS: C2RustUnnamed_34 = 1106487;
pub const KEYC_TRIPLECLICK8_PANE: C2RustUnnamed_34 = 1106486;
pub const KEYC_TRIPLECLICK7_BORDER: C2RustUnnamed_34 = 1106485;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106484;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106483;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106482;
pub const KEYC_TRIPLECLICK7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106481;
pub const KEYC_TRIPLECLICK7_STATUS_RIGHT: C2RustUnnamed_34 = 1106480;
pub const KEYC_TRIPLECLICK7_STATUS_LEFT: C2RustUnnamed_34 = 1106479;
pub const KEYC_TRIPLECLICK7_STATUS: C2RustUnnamed_34 = 1106478;
pub const KEYC_TRIPLECLICK7_PANE: C2RustUnnamed_34 = 1106477;
pub const KEYC_TRIPLECLICK6_BORDER: C2RustUnnamed_34 = 1106476;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106475;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106474;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106473;
pub const KEYC_TRIPLECLICK6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106472;
pub const KEYC_TRIPLECLICK6_STATUS_RIGHT: C2RustUnnamed_34 = 1106471;
pub const KEYC_TRIPLECLICK6_STATUS_LEFT: C2RustUnnamed_34 = 1106470;
pub const KEYC_TRIPLECLICK6_STATUS: C2RustUnnamed_34 = 1106469;
pub const KEYC_TRIPLECLICK6_PANE: C2RustUnnamed_34 = 1106468;
pub const KEYC_TRIPLECLICK3_BORDER: C2RustUnnamed_34 = 1106467;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106466;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106465;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106464;
pub const KEYC_TRIPLECLICK3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106463;
pub const KEYC_TRIPLECLICK3_STATUS_RIGHT: C2RustUnnamed_34 = 1106462;
pub const KEYC_TRIPLECLICK3_STATUS_LEFT: C2RustUnnamed_34 = 1106461;
pub const KEYC_TRIPLECLICK3_STATUS: C2RustUnnamed_34 = 1106460;
pub const KEYC_TRIPLECLICK3_PANE: C2RustUnnamed_34 = 1106459;
pub const KEYC_TRIPLECLICK2_BORDER: C2RustUnnamed_34 = 1106458;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106457;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106456;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106455;
pub const KEYC_TRIPLECLICK2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106454;
pub const KEYC_TRIPLECLICK2_STATUS_RIGHT: C2RustUnnamed_34 = 1106453;
pub const KEYC_TRIPLECLICK2_STATUS_LEFT: C2RustUnnamed_34 = 1106452;
pub const KEYC_TRIPLECLICK2_STATUS: C2RustUnnamed_34 = 1106451;
pub const KEYC_TRIPLECLICK2_PANE: C2RustUnnamed_34 = 1106450;
pub const KEYC_TRIPLECLICK1_BORDER: C2RustUnnamed_34 = 1106449;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106448;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106447;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106446;
pub const KEYC_TRIPLECLICK1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106445;
pub const KEYC_TRIPLECLICK1_STATUS_RIGHT: C2RustUnnamed_34 = 1106444;
pub const KEYC_TRIPLECLICK1_STATUS_LEFT: C2RustUnnamed_34 = 1106443;
pub const KEYC_TRIPLECLICK1_STATUS: C2RustUnnamed_34 = 1106442;
pub const KEYC_TRIPLECLICK1_PANE: C2RustUnnamed_34 = 1106441;
pub const KEYC_DOUBLECLICK11_BORDER: C2RustUnnamed_34 = 1106440;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106439;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106438;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106437;
pub const KEYC_DOUBLECLICK11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106436;
pub const KEYC_DOUBLECLICK11_STATUS_RIGHT: C2RustUnnamed_34 = 1106435;
pub const KEYC_DOUBLECLICK11_STATUS_LEFT: C2RustUnnamed_34 = 1106434;
pub const KEYC_DOUBLECLICK11_STATUS: C2RustUnnamed_34 = 1106433;
pub const KEYC_DOUBLECLICK11_PANE: C2RustUnnamed_34 = 1106432;
pub const KEYC_DOUBLECLICK10_BORDER: C2RustUnnamed_34 = 1106431;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106430;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106429;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106428;
pub const KEYC_DOUBLECLICK10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106427;
pub const KEYC_DOUBLECLICK10_STATUS_RIGHT: C2RustUnnamed_34 = 1106426;
pub const KEYC_DOUBLECLICK10_STATUS_LEFT: C2RustUnnamed_34 = 1106425;
pub const KEYC_DOUBLECLICK10_STATUS: C2RustUnnamed_34 = 1106424;
pub const KEYC_DOUBLECLICK10_PANE: C2RustUnnamed_34 = 1106423;
pub const KEYC_DOUBLECLICK9_BORDER: C2RustUnnamed_34 = 1106422;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106421;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106420;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106419;
pub const KEYC_DOUBLECLICK9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106418;
pub const KEYC_DOUBLECLICK9_STATUS_RIGHT: C2RustUnnamed_34 = 1106417;
pub const KEYC_DOUBLECLICK9_STATUS_LEFT: C2RustUnnamed_34 = 1106416;
pub const KEYC_DOUBLECLICK9_STATUS: C2RustUnnamed_34 = 1106415;
pub const KEYC_DOUBLECLICK9_PANE: C2RustUnnamed_34 = 1106414;
pub const KEYC_DOUBLECLICK8_BORDER: C2RustUnnamed_34 = 1106413;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106412;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106411;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106410;
pub const KEYC_DOUBLECLICK8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106409;
pub const KEYC_DOUBLECLICK8_STATUS_RIGHT: C2RustUnnamed_34 = 1106408;
pub const KEYC_DOUBLECLICK8_STATUS_LEFT: C2RustUnnamed_34 = 1106407;
pub const KEYC_DOUBLECLICK8_STATUS: C2RustUnnamed_34 = 1106406;
pub const KEYC_DOUBLECLICK8_PANE: C2RustUnnamed_34 = 1106405;
pub const KEYC_DOUBLECLICK7_BORDER: C2RustUnnamed_34 = 1106404;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106403;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106402;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106401;
pub const KEYC_DOUBLECLICK7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106400;
pub const KEYC_DOUBLECLICK7_STATUS_RIGHT: C2RustUnnamed_34 = 1106399;
pub const KEYC_DOUBLECLICK7_STATUS_LEFT: C2RustUnnamed_34 = 1106398;
pub const KEYC_DOUBLECLICK7_STATUS: C2RustUnnamed_34 = 1106397;
pub const KEYC_DOUBLECLICK7_PANE: C2RustUnnamed_34 = 1106396;
pub const KEYC_DOUBLECLICK6_BORDER: C2RustUnnamed_34 = 1106395;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106394;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106393;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106392;
pub const KEYC_DOUBLECLICK6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106391;
pub const KEYC_DOUBLECLICK6_STATUS_RIGHT: C2RustUnnamed_34 = 1106390;
pub const KEYC_DOUBLECLICK6_STATUS_LEFT: C2RustUnnamed_34 = 1106389;
pub const KEYC_DOUBLECLICK6_STATUS: C2RustUnnamed_34 = 1106388;
pub const KEYC_DOUBLECLICK6_PANE: C2RustUnnamed_34 = 1106387;
pub const KEYC_DOUBLECLICK3_BORDER: C2RustUnnamed_34 = 1106386;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106385;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106384;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106383;
pub const KEYC_DOUBLECLICK3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106382;
pub const KEYC_DOUBLECLICK3_STATUS_RIGHT: C2RustUnnamed_34 = 1106381;
pub const KEYC_DOUBLECLICK3_STATUS_LEFT: C2RustUnnamed_34 = 1106380;
pub const KEYC_DOUBLECLICK3_STATUS: C2RustUnnamed_34 = 1106379;
pub const KEYC_DOUBLECLICK3_PANE: C2RustUnnamed_34 = 1106378;
pub const KEYC_DOUBLECLICK2_BORDER: C2RustUnnamed_34 = 1106377;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106376;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106375;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106374;
pub const KEYC_DOUBLECLICK2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106373;
pub const KEYC_DOUBLECLICK2_STATUS_RIGHT: C2RustUnnamed_34 = 1106372;
pub const KEYC_DOUBLECLICK2_STATUS_LEFT: C2RustUnnamed_34 = 1106371;
pub const KEYC_DOUBLECLICK2_STATUS: C2RustUnnamed_34 = 1106370;
pub const KEYC_DOUBLECLICK2_PANE: C2RustUnnamed_34 = 1106369;
pub const KEYC_DOUBLECLICK1_BORDER: C2RustUnnamed_34 = 1106368;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106367;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106366;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106365;
pub const KEYC_DOUBLECLICK1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106364;
pub const KEYC_DOUBLECLICK1_STATUS_RIGHT: C2RustUnnamed_34 = 1106363;
pub const KEYC_DOUBLECLICK1_STATUS_LEFT: C2RustUnnamed_34 = 1106362;
pub const KEYC_DOUBLECLICK1_STATUS: C2RustUnnamed_34 = 1106361;
pub const KEYC_DOUBLECLICK1_PANE: C2RustUnnamed_34 = 1106360;
pub const KEYC_SECONDCLICK11_BORDER: C2RustUnnamed_34 = 1106359;
pub const KEYC_SECONDCLICK11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106358;
pub const KEYC_SECONDCLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106357;
pub const KEYC_SECONDCLICK11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106356;
pub const KEYC_SECONDCLICK11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106355;
pub const KEYC_SECONDCLICK11_STATUS_RIGHT: C2RustUnnamed_34 = 1106354;
pub const KEYC_SECONDCLICK11_STATUS_LEFT: C2RustUnnamed_34 = 1106353;
pub const KEYC_SECONDCLICK11_STATUS: C2RustUnnamed_34 = 1106352;
pub const KEYC_SECONDCLICK11_PANE: C2RustUnnamed_34 = 1106351;
pub const KEYC_SECONDCLICK10_BORDER: C2RustUnnamed_34 = 1106350;
pub const KEYC_SECONDCLICK10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106349;
pub const KEYC_SECONDCLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106348;
pub const KEYC_SECONDCLICK10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106347;
pub const KEYC_SECONDCLICK10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106346;
pub const KEYC_SECONDCLICK10_STATUS_RIGHT: C2RustUnnamed_34 = 1106345;
pub const KEYC_SECONDCLICK10_STATUS_LEFT: C2RustUnnamed_34 = 1106344;
pub const KEYC_SECONDCLICK10_STATUS: C2RustUnnamed_34 = 1106343;
pub const KEYC_SECONDCLICK10_PANE: C2RustUnnamed_34 = 1106342;
pub const KEYC_SECONDCLICK9_BORDER: C2RustUnnamed_34 = 1106341;
pub const KEYC_SECONDCLICK9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106340;
pub const KEYC_SECONDCLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106339;
pub const KEYC_SECONDCLICK9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106338;
pub const KEYC_SECONDCLICK9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106337;
pub const KEYC_SECONDCLICK9_STATUS_RIGHT: C2RustUnnamed_34 = 1106336;
pub const KEYC_SECONDCLICK9_STATUS_LEFT: C2RustUnnamed_34 = 1106335;
pub const KEYC_SECONDCLICK9_STATUS: C2RustUnnamed_34 = 1106334;
pub const KEYC_SECONDCLICK9_PANE: C2RustUnnamed_34 = 1106333;
pub const KEYC_SECONDCLICK8_BORDER: C2RustUnnamed_34 = 1106332;
pub const KEYC_SECONDCLICK8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106331;
pub const KEYC_SECONDCLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106330;
pub const KEYC_SECONDCLICK8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106329;
pub const KEYC_SECONDCLICK8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106328;
pub const KEYC_SECONDCLICK8_STATUS_RIGHT: C2RustUnnamed_34 = 1106327;
pub const KEYC_SECONDCLICK8_STATUS_LEFT: C2RustUnnamed_34 = 1106326;
pub const KEYC_SECONDCLICK8_STATUS: C2RustUnnamed_34 = 1106325;
pub const KEYC_SECONDCLICK8_PANE: C2RustUnnamed_34 = 1106324;
pub const KEYC_SECONDCLICK7_BORDER: C2RustUnnamed_34 = 1106323;
pub const KEYC_SECONDCLICK7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106322;
pub const KEYC_SECONDCLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106321;
pub const KEYC_SECONDCLICK7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106320;
pub const KEYC_SECONDCLICK7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106319;
pub const KEYC_SECONDCLICK7_STATUS_RIGHT: C2RustUnnamed_34 = 1106318;
pub const KEYC_SECONDCLICK7_STATUS_LEFT: C2RustUnnamed_34 = 1106317;
pub const KEYC_SECONDCLICK7_STATUS: C2RustUnnamed_34 = 1106316;
pub const KEYC_SECONDCLICK7_PANE: C2RustUnnamed_34 = 1106315;
pub const KEYC_SECONDCLICK6_BORDER: C2RustUnnamed_34 = 1106314;
pub const KEYC_SECONDCLICK6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106313;
pub const KEYC_SECONDCLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106312;
pub const KEYC_SECONDCLICK6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106311;
pub const KEYC_SECONDCLICK6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106310;
pub const KEYC_SECONDCLICK6_STATUS_RIGHT: C2RustUnnamed_34 = 1106309;
pub const KEYC_SECONDCLICK6_STATUS_LEFT: C2RustUnnamed_34 = 1106308;
pub const KEYC_SECONDCLICK6_STATUS: C2RustUnnamed_34 = 1106307;
pub const KEYC_SECONDCLICK6_PANE: C2RustUnnamed_34 = 1106306;
pub const KEYC_SECONDCLICK3_BORDER: C2RustUnnamed_34 = 1106305;
pub const KEYC_SECONDCLICK3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106304;
pub const KEYC_SECONDCLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106303;
pub const KEYC_SECONDCLICK3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106302;
pub const KEYC_SECONDCLICK3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106301;
pub const KEYC_SECONDCLICK3_STATUS_RIGHT: C2RustUnnamed_34 = 1106300;
pub const KEYC_SECONDCLICK3_STATUS_LEFT: C2RustUnnamed_34 = 1106299;
pub const KEYC_SECONDCLICK3_STATUS: C2RustUnnamed_34 = 1106298;
pub const KEYC_SECONDCLICK3_PANE: C2RustUnnamed_34 = 1106297;
pub const KEYC_SECONDCLICK2_BORDER: C2RustUnnamed_34 = 1106296;
pub const KEYC_SECONDCLICK2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106295;
pub const KEYC_SECONDCLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106294;
pub const KEYC_SECONDCLICK2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106293;
pub const KEYC_SECONDCLICK2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106292;
pub const KEYC_SECONDCLICK2_STATUS_RIGHT: C2RustUnnamed_34 = 1106291;
pub const KEYC_SECONDCLICK2_STATUS_LEFT: C2RustUnnamed_34 = 1106290;
pub const KEYC_SECONDCLICK2_STATUS: C2RustUnnamed_34 = 1106289;
pub const KEYC_SECONDCLICK2_PANE: C2RustUnnamed_34 = 1106288;
pub const KEYC_SECONDCLICK1_BORDER: C2RustUnnamed_34 = 1106287;
pub const KEYC_SECONDCLICK1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106286;
pub const KEYC_SECONDCLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106285;
pub const KEYC_SECONDCLICK1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106284;
pub const KEYC_SECONDCLICK1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106283;
pub const KEYC_SECONDCLICK1_STATUS_RIGHT: C2RustUnnamed_34 = 1106282;
pub const KEYC_SECONDCLICK1_STATUS_LEFT: C2RustUnnamed_34 = 1106281;
pub const KEYC_SECONDCLICK1_STATUS: C2RustUnnamed_34 = 1106280;
pub const KEYC_SECONDCLICK1_PANE: C2RustUnnamed_34 = 1106279;
pub const KEYC_WHEELDOWN_BORDER: C2RustUnnamed_34 = 1106278;
pub const KEYC_WHEELDOWN_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106277;
pub const KEYC_WHEELDOWN_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106276;
pub const KEYC_WHEELDOWN_SCROLLBAR_UP: C2RustUnnamed_34 = 1106275;
pub const KEYC_WHEELDOWN_STATUS_DEFAULT: C2RustUnnamed_34 = 1106274;
pub const KEYC_WHEELDOWN_STATUS_RIGHT: C2RustUnnamed_34 = 1106273;
pub const KEYC_WHEELDOWN_STATUS_LEFT: C2RustUnnamed_34 = 1106272;
pub const KEYC_WHEELDOWN_STATUS: C2RustUnnamed_34 = 1106271;
pub const KEYC_WHEELDOWN_PANE: C2RustUnnamed_34 = 1106270;
pub const KEYC_WHEELUP_BORDER: C2RustUnnamed_34 = 1106269;
pub const KEYC_WHEELUP_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106268;
pub const KEYC_WHEELUP_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106267;
pub const KEYC_WHEELUP_SCROLLBAR_UP: C2RustUnnamed_34 = 1106266;
pub const KEYC_WHEELUP_STATUS_DEFAULT: C2RustUnnamed_34 = 1106265;
pub const KEYC_WHEELUP_STATUS_RIGHT: C2RustUnnamed_34 = 1106264;
pub const KEYC_WHEELUP_STATUS_LEFT: C2RustUnnamed_34 = 1106263;
pub const KEYC_WHEELUP_STATUS: C2RustUnnamed_34 = 1106262;
pub const KEYC_WHEELUP_PANE: C2RustUnnamed_34 = 1106261;
pub const KEYC_MOUSEDRAGEND11_BORDER: C2RustUnnamed_34 = 1106260;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106259;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106258;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106257;
pub const KEYC_MOUSEDRAGEND11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106256;
pub const KEYC_MOUSEDRAGEND11_STATUS_RIGHT: C2RustUnnamed_34 = 1106255;
pub const KEYC_MOUSEDRAGEND11_STATUS_LEFT: C2RustUnnamed_34 = 1106254;
pub const KEYC_MOUSEDRAGEND11_STATUS: C2RustUnnamed_34 = 1106253;
pub const KEYC_MOUSEDRAGEND11_PANE: C2RustUnnamed_34 = 1106252;
pub const KEYC_MOUSEDRAGEND10_BORDER: C2RustUnnamed_34 = 1106251;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106250;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106249;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106248;
pub const KEYC_MOUSEDRAGEND10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106247;
pub const KEYC_MOUSEDRAGEND10_STATUS_RIGHT: C2RustUnnamed_34 = 1106246;
pub const KEYC_MOUSEDRAGEND10_STATUS_LEFT: C2RustUnnamed_34 = 1106245;
pub const KEYC_MOUSEDRAGEND10_STATUS: C2RustUnnamed_34 = 1106244;
pub const KEYC_MOUSEDRAGEND10_PANE: C2RustUnnamed_34 = 1106243;
pub const KEYC_MOUSEDRAGEND9_BORDER: C2RustUnnamed_34 = 1106242;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106241;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106240;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106239;
pub const KEYC_MOUSEDRAGEND9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106238;
pub const KEYC_MOUSEDRAGEND9_STATUS_RIGHT: C2RustUnnamed_34 = 1106237;
pub const KEYC_MOUSEDRAGEND9_STATUS_LEFT: C2RustUnnamed_34 = 1106236;
pub const KEYC_MOUSEDRAGEND9_STATUS: C2RustUnnamed_34 = 1106235;
pub const KEYC_MOUSEDRAGEND9_PANE: C2RustUnnamed_34 = 1106234;
pub const KEYC_MOUSEDRAGEND8_BORDER: C2RustUnnamed_34 = 1106233;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106232;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106231;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106230;
pub const KEYC_MOUSEDRAGEND8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106229;
pub const KEYC_MOUSEDRAGEND8_STATUS_RIGHT: C2RustUnnamed_34 = 1106228;
pub const KEYC_MOUSEDRAGEND8_STATUS_LEFT: C2RustUnnamed_34 = 1106227;
pub const KEYC_MOUSEDRAGEND8_STATUS: C2RustUnnamed_34 = 1106226;
pub const KEYC_MOUSEDRAGEND8_PANE: C2RustUnnamed_34 = 1106225;
pub const KEYC_MOUSEDRAGEND7_BORDER: C2RustUnnamed_34 = 1106224;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106223;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106222;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106221;
pub const KEYC_MOUSEDRAGEND7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106220;
pub const KEYC_MOUSEDRAGEND7_STATUS_RIGHT: C2RustUnnamed_34 = 1106219;
pub const KEYC_MOUSEDRAGEND7_STATUS_LEFT: C2RustUnnamed_34 = 1106218;
pub const KEYC_MOUSEDRAGEND7_STATUS: C2RustUnnamed_34 = 1106217;
pub const KEYC_MOUSEDRAGEND7_PANE: C2RustUnnamed_34 = 1106216;
pub const KEYC_MOUSEDRAGEND6_BORDER: C2RustUnnamed_34 = 1106215;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106214;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106213;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106212;
pub const KEYC_MOUSEDRAGEND6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106211;
pub const KEYC_MOUSEDRAGEND6_STATUS_RIGHT: C2RustUnnamed_34 = 1106210;
pub const KEYC_MOUSEDRAGEND6_STATUS_LEFT: C2RustUnnamed_34 = 1106209;
pub const KEYC_MOUSEDRAGEND6_STATUS: C2RustUnnamed_34 = 1106208;
pub const KEYC_MOUSEDRAGEND6_PANE: C2RustUnnamed_34 = 1106207;
pub const KEYC_MOUSEDRAGEND3_BORDER: C2RustUnnamed_34 = 1106206;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106205;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106204;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106203;
pub const KEYC_MOUSEDRAGEND3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106202;
pub const KEYC_MOUSEDRAGEND3_STATUS_RIGHT: C2RustUnnamed_34 = 1106201;
pub const KEYC_MOUSEDRAGEND3_STATUS_LEFT: C2RustUnnamed_34 = 1106200;
pub const KEYC_MOUSEDRAGEND3_STATUS: C2RustUnnamed_34 = 1106199;
pub const KEYC_MOUSEDRAGEND3_PANE: C2RustUnnamed_34 = 1106198;
pub const KEYC_MOUSEDRAGEND2_BORDER: C2RustUnnamed_34 = 1106197;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106196;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106195;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106194;
pub const KEYC_MOUSEDRAGEND2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106193;
pub const KEYC_MOUSEDRAGEND2_STATUS_RIGHT: C2RustUnnamed_34 = 1106192;
pub const KEYC_MOUSEDRAGEND2_STATUS_LEFT: C2RustUnnamed_34 = 1106191;
pub const KEYC_MOUSEDRAGEND2_STATUS: C2RustUnnamed_34 = 1106190;
pub const KEYC_MOUSEDRAGEND2_PANE: C2RustUnnamed_34 = 1106189;
pub const KEYC_MOUSEDRAGEND1_BORDER: C2RustUnnamed_34 = 1106188;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106187;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106186;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106185;
pub const KEYC_MOUSEDRAGEND1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106184;
pub const KEYC_MOUSEDRAGEND1_STATUS_RIGHT: C2RustUnnamed_34 = 1106183;
pub const KEYC_MOUSEDRAGEND1_STATUS_LEFT: C2RustUnnamed_34 = 1106182;
pub const KEYC_MOUSEDRAGEND1_STATUS: C2RustUnnamed_34 = 1106181;
pub const KEYC_MOUSEDRAGEND1_PANE: C2RustUnnamed_34 = 1106180;
pub const KEYC_MOUSEDRAG11_BORDER: C2RustUnnamed_34 = 1106179;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106178;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106177;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106176;
pub const KEYC_MOUSEDRAG11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106175;
pub const KEYC_MOUSEDRAG11_STATUS_RIGHT: C2RustUnnamed_34 = 1106174;
pub const KEYC_MOUSEDRAG11_STATUS_LEFT: C2RustUnnamed_34 = 1106173;
pub const KEYC_MOUSEDRAG11_STATUS: C2RustUnnamed_34 = 1106172;
pub const KEYC_MOUSEDRAG11_PANE: C2RustUnnamed_34 = 1106171;
pub const KEYC_MOUSEDRAG10_BORDER: C2RustUnnamed_34 = 1106170;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106169;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106168;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106167;
pub const KEYC_MOUSEDRAG10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106166;
pub const KEYC_MOUSEDRAG10_STATUS_RIGHT: C2RustUnnamed_34 = 1106165;
pub const KEYC_MOUSEDRAG10_STATUS_LEFT: C2RustUnnamed_34 = 1106164;
pub const KEYC_MOUSEDRAG10_STATUS: C2RustUnnamed_34 = 1106163;
pub const KEYC_MOUSEDRAG10_PANE: C2RustUnnamed_34 = 1106162;
pub const KEYC_MOUSEDRAG9_BORDER: C2RustUnnamed_34 = 1106161;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106160;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106159;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106158;
pub const KEYC_MOUSEDRAG9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106157;
pub const KEYC_MOUSEDRAG9_STATUS_RIGHT: C2RustUnnamed_34 = 1106156;
pub const KEYC_MOUSEDRAG9_STATUS_LEFT: C2RustUnnamed_34 = 1106155;
pub const KEYC_MOUSEDRAG9_STATUS: C2RustUnnamed_34 = 1106154;
pub const KEYC_MOUSEDRAG9_PANE: C2RustUnnamed_34 = 1106153;
pub const KEYC_MOUSEDRAG8_BORDER: C2RustUnnamed_34 = 1106152;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106151;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106150;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106149;
pub const KEYC_MOUSEDRAG8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106148;
pub const KEYC_MOUSEDRAG8_STATUS_RIGHT: C2RustUnnamed_34 = 1106147;
pub const KEYC_MOUSEDRAG8_STATUS_LEFT: C2RustUnnamed_34 = 1106146;
pub const KEYC_MOUSEDRAG8_STATUS: C2RustUnnamed_34 = 1106145;
pub const KEYC_MOUSEDRAG8_PANE: C2RustUnnamed_34 = 1106144;
pub const KEYC_MOUSEDRAG7_BORDER: C2RustUnnamed_34 = 1106143;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106142;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106141;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106140;
pub const KEYC_MOUSEDRAG7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106139;
pub const KEYC_MOUSEDRAG7_STATUS_RIGHT: C2RustUnnamed_34 = 1106138;
pub const KEYC_MOUSEDRAG7_STATUS_LEFT: C2RustUnnamed_34 = 1106137;
pub const KEYC_MOUSEDRAG7_STATUS: C2RustUnnamed_34 = 1106136;
pub const KEYC_MOUSEDRAG7_PANE: C2RustUnnamed_34 = 1106135;
pub const KEYC_MOUSEDRAG6_BORDER: C2RustUnnamed_34 = 1106134;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106133;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106132;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106131;
pub const KEYC_MOUSEDRAG6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106130;
pub const KEYC_MOUSEDRAG6_STATUS_RIGHT: C2RustUnnamed_34 = 1106129;
pub const KEYC_MOUSEDRAG6_STATUS_LEFT: C2RustUnnamed_34 = 1106128;
pub const KEYC_MOUSEDRAG6_STATUS: C2RustUnnamed_34 = 1106127;
pub const KEYC_MOUSEDRAG6_PANE: C2RustUnnamed_34 = 1106126;
pub const KEYC_MOUSEDRAG3_BORDER: C2RustUnnamed_34 = 1106125;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106124;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106123;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106122;
pub const KEYC_MOUSEDRAG3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106121;
pub const KEYC_MOUSEDRAG3_STATUS_RIGHT: C2RustUnnamed_34 = 1106120;
pub const KEYC_MOUSEDRAG3_STATUS_LEFT: C2RustUnnamed_34 = 1106119;
pub const KEYC_MOUSEDRAG3_STATUS: C2RustUnnamed_34 = 1106118;
pub const KEYC_MOUSEDRAG3_PANE: C2RustUnnamed_34 = 1106117;
pub const KEYC_MOUSEDRAG2_BORDER: C2RustUnnamed_34 = 1106116;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106115;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106114;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106113;
pub const KEYC_MOUSEDRAG2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106112;
pub const KEYC_MOUSEDRAG2_STATUS_RIGHT: C2RustUnnamed_34 = 1106111;
pub const KEYC_MOUSEDRAG2_STATUS_LEFT: C2RustUnnamed_34 = 1106110;
pub const KEYC_MOUSEDRAG2_STATUS: C2RustUnnamed_34 = 1106109;
pub const KEYC_MOUSEDRAG2_PANE: C2RustUnnamed_34 = 1106108;
pub const KEYC_MOUSEDRAG1_BORDER: C2RustUnnamed_34 = 1106107;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106106;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106105;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106104;
pub const KEYC_MOUSEDRAG1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106103;
pub const KEYC_MOUSEDRAG1_STATUS_RIGHT: C2RustUnnamed_34 = 1106102;
pub const KEYC_MOUSEDRAG1_STATUS_LEFT: C2RustUnnamed_34 = 1106101;
pub const KEYC_MOUSEDRAG1_STATUS: C2RustUnnamed_34 = 1106100;
pub const KEYC_MOUSEDRAG1_PANE: C2RustUnnamed_34 = 1106099;
pub const KEYC_MOUSEUP11_BORDER: C2RustUnnamed_34 = 1106098;
pub const KEYC_MOUSEUP11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106097;
pub const KEYC_MOUSEUP11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106096;
pub const KEYC_MOUSEUP11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106095;
pub const KEYC_MOUSEUP11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106094;
pub const KEYC_MOUSEUP11_STATUS_RIGHT: C2RustUnnamed_34 = 1106093;
pub const KEYC_MOUSEUP11_STATUS_LEFT: C2RustUnnamed_34 = 1106092;
pub const KEYC_MOUSEUP11_STATUS: C2RustUnnamed_34 = 1106091;
pub const KEYC_MOUSEUP11_PANE: C2RustUnnamed_34 = 1106090;
pub const KEYC_MOUSEUP10_BORDER: C2RustUnnamed_34 = 1106089;
pub const KEYC_MOUSEUP10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106088;
pub const KEYC_MOUSEUP10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106087;
pub const KEYC_MOUSEUP10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106086;
pub const KEYC_MOUSEUP10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106085;
pub const KEYC_MOUSEUP10_STATUS_RIGHT: C2RustUnnamed_34 = 1106084;
pub const KEYC_MOUSEUP10_STATUS_LEFT: C2RustUnnamed_34 = 1106083;
pub const KEYC_MOUSEUP10_STATUS: C2RustUnnamed_34 = 1106082;
pub const KEYC_MOUSEUP10_PANE: C2RustUnnamed_34 = 1106081;
pub const KEYC_MOUSEUP9_BORDER: C2RustUnnamed_34 = 1106080;
pub const KEYC_MOUSEUP9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106079;
pub const KEYC_MOUSEUP9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106078;
pub const KEYC_MOUSEUP9_SCROLLBAR_UP: C2RustUnnamed_34 = 1106077;
pub const KEYC_MOUSEUP9_STATUS_DEFAULT: C2RustUnnamed_34 = 1106076;
pub const KEYC_MOUSEUP9_STATUS_RIGHT: C2RustUnnamed_34 = 1106075;
pub const KEYC_MOUSEUP9_STATUS_LEFT: C2RustUnnamed_34 = 1106074;
pub const KEYC_MOUSEUP9_STATUS: C2RustUnnamed_34 = 1106073;
pub const KEYC_MOUSEUP9_PANE: C2RustUnnamed_34 = 1106072;
pub const KEYC_MOUSEUP8_BORDER: C2RustUnnamed_34 = 1106071;
pub const KEYC_MOUSEUP8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106070;
pub const KEYC_MOUSEUP8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106069;
pub const KEYC_MOUSEUP8_SCROLLBAR_UP: C2RustUnnamed_34 = 1106068;
pub const KEYC_MOUSEUP8_STATUS_DEFAULT: C2RustUnnamed_34 = 1106067;
pub const KEYC_MOUSEUP8_STATUS_RIGHT: C2RustUnnamed_34 = 1106066;
pub const KEYC_MOUSEUP8_STATUS_LEFT: C2RustUnnamed_34 = 1106065;
pub const KEYC_MOUSEUP8_STATUS: C2RustUnnamed_34 = 1106064;
pub const KEYC_MOUSEUP8_PANE: C2RustUnnamed_34 = 1106063;
pub const KEYC_MOUSEUP7_BORDER: C2RustUnnamed_34 = 1106062;
pub const KEYC_MOUSEUP7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106061;
pub const KEYC_MOUSEUP7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106060;
pub const KEYC_MOUSEUP7_SCROLLBAR_UP: C2RustUnnamed_34 = 1106059;
pub const KEYC_MOUSEUP7_STATUS_DEFAULT: C2RustUnnamed_34 = 1106058;
pub const KEYC_MOUSEUP7_STATUS_RIGHT: C2RustUnnamed_34 = 1106057;
pub const KEYC_MOUSEUP7_STATUS_LEFT: C2RustUnnamed_34 = 1106056;
pub const KEYC_MOUSEUP7_STATUS: C2RustUnnamed_34 = 1106055;
pub const KEYC_MOUSEUP7_PANE: C2RustUnnamed_34 = 1106054;
pub const KEYC_MOUSEUP6_BORDER: C2RustUnnamed_34 = 1106053;
pub const KEYC_MOUSEUP6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106052;
pub const KEYC_MOUSEUP6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106051;
pub const KEYC_MOUSEUP6_SCROLLBAR_UP: C2RustUnnamed_34 = 1106050;
pub const KEYC_MOUSEUP6_STATUS_DEFAULT: C2RustUnnamed_34 = 1106049;
pub const KEYC_MOUSEUP6_STATUS_RIGHT: C2RustUnnamed_34 = 1106048;
pub const KEYC_MOUSEUP6_STATUS_LEFT: C2RustUnnamed_34 = 1106047;
pub const KEYC_MOUSEUP6_STATUS: C2RustUnnamed_34 = 1106046;
pub const KEYC_MOUSEUP6_PANE: C2RustUnnamed_34 = 1106045;
pub const KEYC_MOUSEUP3_BORDER: C2RustUnnamed_34 = 1106044;
pub const KEYC_MOUSEUP3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106043;
pub const KEYC_MOUSEUP3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106042;
pub const KEYC_MOUSEUP3_SCROLLBAR_UP: C2RustUnnamed_34 = 1106041;
pub const KEYC_MOUSEUP3_STATUS_DEFAULT: C2RustUnnamed_34 = 1106040;
pub const KEYC_MOUSEUP3_STATUS_RIGHT: C2RustUnnamed_34 = 1106039;
pub const KEYC_MOUSEUP3_STATUS_LEFT: C2RustUnnamed_34 = 1106038;
pub const KEYC_MOUSEUP3_STATUS: C2RustUnnamed_34 = 1106037;
pub const KEYC_MOUSEUP3_PANE: C2RustUnnamed_34 = 1106036;
pub const KEYC_MOUSEUP2_BORDER: C2RustUnnamed_34 = 1106035;
pub const KEYC_MOUSEUP2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106034;
pub const KEYC_MOUSEUP2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106033;
pub const KEYC_MOUSEUP2_SCROLLBAR_UP: C2RustUnnamed_34 = 1106032;
pub const KEYC_MOUSEUP2_STATUS_DEFAULT: C2RustUnnamed_34 = 1106031;
pub const KEYC_MOUSEUP2_STATUS_RIGHT: C2RustUnnamed_34 = 1106030;
pub const KEYC_MOUSEUP2_STATUS_LEFT: C2RustUnnamed_34 = 1106029;
pub const KEYC_MOUSEUP2_STATUS: C2RustUnnamed_34 = 1106028;
pub const KEYC_MOUSEUP2_PANE: C2RustUnnamed_34 = 1106027;
pub const KEYC_MOUSEUP1_BORDER: C2RustUnnamed_34 = 1106026;
pub const KEYC_MOUSEUP1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106025;
pub const KEYC_MOUSEUP1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106024;
pub const KEYC_MOUSEUP1_SCROLLBAR_UP: C2RustUnnamed_34 = 1106023;
pub const KEYC_MOUSEUP1_STATUS_DEFAULT: C2RustUnnamed_34 = 1106022;
pub const KEYC_MOUSEUP1_STATUS_RIGHT: C2RustUnnamed_34 = 1106021;
pub const KEYC_MOUSEUP1_STATUS_LEFT: C2RustUnnamed_34 = 1106020;
pub const KEYC_MOUSEUP1_STATUS: C2RustUnnamed_34 = 1106019;
pub const KEYC_MOUSEUP1_PANE: C2RustUnnamed_34 = 1106018;
pub const KEYC_MOUSEDOWN11_BORDER: C2RustUnnamed_34 = 1106017;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106016;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106015;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_UP: C2RustUnnamed_34 = 1106014;
pub const KEYC_MOUSEDOWN11_STATUS_DEFAULT: C2RustUnnamed_34 = 1106013;
pub const KEYC_MOUSEDOWN11_STATUS_RIGHT: C2RustUnnamed_34 = 1106012;
pub const KEYC_MOUSEDOWN11_STATUS_LEFT: C2RustUnnamed_34 = 1106011;
pub const KEYC_MOUSEDOWN11_STATUS: C2RustUnnamed_34 = 1106010;
pub const KEYC_MOUSEDOWN11_PANE: C2RustUnnamed_34 = 1106009;
pub const KEYC_MOUSEDOWN10_BORDER: C2RustUnnamed_34 = 1106008;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1106007;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1106006;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_UP: C2RustUnnamed_34 = 1106005;
pub const KEYC_MOUSEDOWN10_STATUS_DEFAULT: C2RustUnnamed_34 = 1106004;
pub const KEYC_MOUSEDOWN10_STATUS_RIGHT: C2RustUnnamed_34 = 1106003;
pub const KEYC_MOUSEDOWN10_STATUS_LEFT: C2RustUnnamed_34 = 1106002;
pub const KEYC_MOUSEDOWN10_STATUS: C2RustUnnamed_34 = 1106001;
pub const KEYC_MOUSEDOWN10_PANE: C2RustUnnamed_34 = 1106000;
pub const KEYC_MOUSEDOWN9_BORDER: C2RustUnnamed_34 = 1105999;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105998;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105997;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_UP: C2RustUnnamed_34 = 1105996;
pub const KEYC_MOUSEDOWN9_STATUS_DEFAULT: C2RustUnnamed_34 = 1105995;
pub const KEYC_MOUSEDOWN9_STATUS_RIGHT: C2RustUnnamed_34 = 1105994;
pub const KEYC_MOUSEDOWN9_STATUS_LEFT: C2RustUnnamed_34 = 1105993;
pub const KEYC_MOUSEDOWN9_STATUS: C2RustUnnamed_34 = 1105992;
pub const KEYC_MOUSEDOWN9_PANE: C2RustUnnamed_34 = 1105991;
pub const KEYC_MOUSEDOWN8_BORDER: C2RustUnnamed_34 = 1105990;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105989;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105988;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_UP: C2RustUnnamed_34 = 1105987;
pub const KEYC_MOUSEDOWN8_STATUS_DEFAULT: C2RustUnnamed_34 = 1105986;
pub const KEYC_MOUSEDOWN8_STATUS_RIGHT: C2RustUnnamed_34 = 1105985;
pub const KEYC_MOUSEDOWN8_STATUS_LEFT: C2RustUnnamed_34 = 1105984;
pub const KEYC_MOUSEDOWN8_STATUS: C2RustUnnamed_34 = 1105983;
pub const KEYC_MOUSEDOWN8_PANE: C2RustUnnamed_34 = 1105982;
pub const KEYC_MOUSEDOWN7_BORDER: C2RustUnnamed_34 = 1105981;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105980;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105979;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_UP: C2RustUnnamed_34 = 1105978;
pub const KEYC_MOUSEDOWN7_STATUS_DEFAULT: C2RustUnnamed_34 = 1105977;
pub const KEYC_MOUSEDOWN7_STATUS_RIGHT: C2RustUnnamed_34 = 1105976;
pub const KEYC_MOUSEDOWN7_STATUS_LEFT: C2RustUnnamed_34 = 1105975;
pub const KEYC_MOUSEDOWN7_STATUS: C2RustUnnamed_34 = 1105974;
pub const KEYC_MOUSEDOWN7_PANE: C2RustUnnamed_34 = 1105973;
pub const KEYC_MOUSEDOWN6_BORDER: C2RustUnnamed_34 = 1105972;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105971;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105970;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_UP: C2RustUnnamed_34 = 1105969;
pub const KEYC_MOUSEDOWN6_STATUS_DEFAULT: C2RustUnnamed_34 = 1105968;
pub const KEYC_MOUSEDOWN6_STATUS_RIGHT: C2RustUnnamed_34 = 1105967;
pub const KEYC_MOUSEDOWN6_STATUS_LEFT: C2RustUnnamed_34 = 1105966;
pub const KEYC_MOUSEDOWN6_STATUS: C2RustUnnamed_34 = 1105965;
pub const KEYC_MOUSEDOWN6_PANE: C2RustUnnamed_34 = 1105964;
pub const KEYC_MOUSEDOWN3_BORDER: C2RustUnnamed_34 = 1105963;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105962;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105961;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_UP: C2RustUnnamed_34 = 1105960;
pub const KEYC_MOUSEDOWN3_STATUS_DEFAULT: C2RustUnnamed_34 = 1105959;
pub const KEYC_MOUSEDOWN3_STATUS_RIGHT: C2RustUnnamed_34 = 1105958;
pub const KEYC_MOUSEDOWN3_STATUS_LEFT: C2RustUnnamed_34 = 1105957;
pub const KEYC_MOUSEDOWN3_STATUS: C2RustUnnamed_34 = 1105956;
pub const KEYC_MOUSEDOWN3_PANE: C2RustUnnamed_34 = 1105955;
pub const KEYC_MOUSEDOWN2_BORDER: C2RustUnnamed_34 = 1105954;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105953;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105952;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_UP: C2RustUnnamed_34 = 1105951;
pub const KEYC_MOUSEDOWN2_STATUS_DEFAULT: C2RustUnnamed_34 = 1105950;
pub const KEYC_MOUSEDOWN2_STATUS_RIGHT: C2RustUnnamed_34 = 1105949;
pub const KEYC_MOUSEDOWN2_STATUS_LEFT: C2RustUnnamed_34 = 1105948;
pub const KEYC_MOUSEDOWN2_STATUS: C2RustUnnamed_34 = 1105947;
pub const KEYC_MOUSEDOWN2_PANE: C2RustUnnamed_34 = 1105946;
pub const KEYC_MOUSEDOWN1_BORDER: C2RustUnnamed_34 = 1105945;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105944;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105943;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_UP: C2RustUnnamed_34 = 1105942;
pub const KEYC_MOUSEDOWN1_STATUS_DEFAULT: C2RustUnnamed_34 = 1105941;
pub const KEYC_MOUSEDOWN1_STATUS_RIGHT: C2RustUnnamed_34 = 1105940;
pub const KEYC_MOUSEDOWN1_STATUS_LEFT: C2RustUnnamed_34 = 1105939;
pub const KEYC_MOUSEDOWN1_STATUS: C2RustUnnamed_34 = 1105938;
pub const KEYC_MOUSEDOWN1_PANE: C2RustUnnamed_34 = 1105937;
pub const KEYC_MOUSEMOVE_BORDER: C2RustUnnamed_34 = 1105936;
pub const KEYC_MOUSEMOVE_SCROLLBAR_DOWN: C2RustUnnamed_34 = 1105935;
pub const KEYC_MOUSEMOVE_SCROLLBAR_SLIDER: C2RustUnnamed_34 = 1105934;
pub const KEYC_MOUSEMOVE_SCROLLBAR_UP: C2RustUnnamed_34 = 1105933;
pub const KEYC_MOUSEMOVE_STATUS_DEFAULT: C2RustUnnamed_34 = 1105932;
pub const KEYC_MOUSEMOVE_STATUS_RIGHT: C2RustUnnamed_34 = 1105931;
pub const KEYC_MOUSEMOVE_STATUS_LEFT: C2RustUnnamed_34 = 1105930;
pub const KEYC_MOUSEMOVE_STATUS: C2RustUnnamed_34 = 1105929;
pub const KEYC_MOUSEMOVE_PANE: C2RustUnnamed_34 = 1105928;
pub const KEYC_DOUBLECLICK: C2RustUnnamed_34 = 1105927;
pub const KEYC_DRAGGING: C2RustUnnamed_34 = 1105926;
pub const KEYC_MOUSE: C2RustUnnamed_34 = 1105925;
pub const KEYC_PASTE_END: C2RustUnnamed_34 = 1105924;
pub const KEYC_PASTE_START: C2RustUnnamed_34 = 1105923;
pub const KEYC_ANY: C2RustUnnamed_34 = 1105922;
pub const KEYC_FOCUS_OUT: C2RustUnnamed_34 = 1105921;
pub const KEYC_FOCUS_IN: C2RustUnnamed_34 = 1105920;
pub type utf8_state = u32;
pub const UTF8_ERROR: utf8_state = 2;
pub const UTF8_DONE: utf8_state = 1;
pub const UTF8_MORE: utf8_state = 0;
pub type box_lines = i32;
pub const BOX_LINES_NONE: box_lines = 6;
pub const BOX_LINES_PADDED: box_lines = 5;
pub const BOX_LINES_ROUNDED: box_lines = 4;
pub const BOX_LINES_SIMPLE: box_lines = 3;
pub const BOX_LINES_HEAVY: box_lines = 2;
pub const BOX_LINES_DOUBLE: box_lines = 1;
pub const BOX_LINES_SINGLE: box_lines = 0;
pub const BOX_LINES_DEFAULT: box_lines = -1;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct menu_item {
    pub name: *const i8,
    pub key: key_code,
    pub command: *const i8,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct menu {
    pub title: *const i8,
    pub items: *mut menu_item,
    pub count: u_int,
    pub width: u_int,
}
pub type menu_choice_cb =
    Option<unsafe extern "C" fn(*mut menu, u_int, key_code, *mut ()) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct sessions {
    pub rbh_root: *mut session,
}
pub type args_parse_type = u32;
pub const ARGS_PARSE_COMMANDS: args_parse_type = 3;
pub const ARGS_PARSE_COMMANDS_OR_STRING: args_parse_type = 2;
pub const ARGS_PARSE_STRING: args_parse_type = 1;
pub const ARGS_PARSE_INVALID: args_parse_type = 0;
pub type args_parse_cb =
    Option<unsafe extern "C" fn(*mut args, u_int, *mut *mut i8) -> args_parse_type>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct args_parse {
    pub template: *const i8,
    pub lower: i32,
    pub upper: i32,
    pub cb: args_parse_cb,
}
pub type cmd_find_type = u32;
pub const CMD_FIND_SESSION: cmd_find_type = 2;
pub const CMD_FIND_WINDOW: cmd_find_type = 1;
pub const CMD_FIND_PANE: cmd_find_type = 0;
pub type cmd_retval = i32;
pub const CMD_RETURN_STOP: cmd_retval = 2;
pub const CMD_RETURN_WAIT: cmd_retval = 1;
pub const CMD_RETURN_NORMAL: cmd_retval = 0;
pub const CMD_RETURN_ERROR: cmd_retval = -1;
pub type cmdq_cb = Option<unsafe extern "C" fn(*mut cmdq_item, *mut ()) -> cmd_retval>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_entry_flag {
    pub flag: i8,
    pub type_0: cmd_find_type,
    pub flags: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_entry {
    pub name: *const i8,
    pub alias: *const i8,
    pub args: args_parse,
    pub usage: *const i8,
    pub source: cmd_entry_flag,
    pub target: cmd_entry_flag,
    pub flags: i32,
    pub exec: Option<unsafe extern "C" fn(*mut cmd, *mut cmdq_item) -> cmd_retval>,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct clients {
    pub tqh_first: *mut client,
    pub tqh_last: *mut *mut client,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct options_array {
    pub rbh_root: *mut options_array_item,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union options_value {
    pub string: *mut i8,
    pub number: i64,
    pub style: style,
    pub array: options_array,
    pub cmdlist: *mut cmd_list,
}
pub type options_table_type = u32;
pub const OPTIONS_TABLE_COMMAND: options_table_type = 6;
pub const OPTIONS_TABLE_CHOICE: options_table_type = 5;
pub const OPTIONS_TABLE_FLAG: options_table_type = 4;
pub const OPTIONS_TABLE_COLOUR: options_table_type = 3;
pub const OPTIONS_TABLE_KEY: options_table_type = 2;
pub const OPTIONS_TABLE_NUMBER: options_table_type = 1;
pub const OPTIONS_TABLE_STRING: options_table_type = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct options_table_entry {
    pub name: *const i8,
    pub alternative_name: *const i8,
    pub type_0: options_table_type,
    pub scope: i32,
    pub flags: i32,
    pub minimum: u_int,
    pub maximum: u_int,
    pub choices: *mut *const i8,
    pub default_str: *const i8,
    pub default_num: i64,
    pub default_arr: *mut *const i8,
    pub separator: *const i8,
    pub pattern: *const i8,
    pub text: *const i8,
    pub unit: *const i8,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct status_prompt_menu {
    pub c: *mut client,
    pub start: u_int,
    pub size: u_int,
    pub list: *mut *mut i8,
    pub flag: i8,
}
static mut prompt_type_strings: [*const i8; 4] = [
    b"command\0" as *const u8 as *const i8,
    b"search\0" as *const u8 as *const i8,
    b"target\0" as *const u8 as *const i8,
    b"window-target\0" as *const u8 as *const i8,
];
#[no_mangle]
pub static mut status_prompt_hlist: [*mut *mut i8; 4] = [0 as *const *mut i8 as *mut *mut i8; 4];
#[no_mangle]
pub static mut status_prompt_hsize: [u_int; 4] = [0; 4];
extern "C" fn status_prompt_find_history_file() -> *mut i8 {
    let mut home: *const i8 = std::ptr::null::<i8>();
    let mut history_file: *const i8 = std::ptr::null::<i8>();
    let mut path: *mut i8 = std::ptr::null_mut::<i8>();
    history_file =
        unsafe { options_get_string(global_options, b"history-file\0" as *const u8 as *const i8) };
    if (unsafe { *history_file }) as i32 == '\0' as i32 {
        return std::ptr::null_mut::<i8>();
    }
    if (unsafe { *history_file }) as i32 == '/' as i32 {
        return unsafe { xstrdup(history_file) };
    }
    if (unsafe { *history_file.offset(0 as i32 as isize) }) as i32 != '~' as i32
        || (unsafe { *history_file.offset(1 as i32 as isize) }) as i32 != '/' as i32
    {
        return std::ptr::null_mut::<i8>();
    }
    home = unsafe { find_home() };
    if home.is_null() {
        return std::ptr::null_mut::<i8>();
    }
    (unsafe {
        xasprintf(
            &mut path as *mut *mut i8,
            b"%s%s\0" as *const u8 as *const i8,
            home,
            history_file.offset(1 as i32 as isize),
        )
    });
    return path;
}
extern "C" fn status_prompt_add_typed_history(mut line: *mut i8) {
    let mut typestr: *mut i8 = std::ptr::null_mut::<i8>();
    let mut type_0: prompt_type = PROMPT_TYPE_INVALID;
    typestr = unsafe { strsep(&mut line, b":\0" as *const u8 as *const i8) };
    if !line.is_null() {
        type_0 = status_prompt_type(typestr);
    }
    if type_0 as u32 == PROMPT_TYPE_INVALID as i32 as u32 {
        if !line.is_null() {
            line = unsafe { line.offset(-1) };
            (unsafe { *line = ':' as i32 as i8 });
        }
        status_prompt_add_history(typestr, PROMPT_TYPE_COMMAND as i32 as u_int);
    } else {
        status_prompt_add_history(line, type_0 as u_int);
    };
}
#[no_mangle]
pub extern "C" fn status_prompt_load_history() {
    let mut f: *mut FILE = std::ptr::null_mut::<FILE>();
    let mut history_file: *mut i8 = std::ptr::null_mut::<i8>();
    let mut line: *mut i8 = std::ptr::null_mut::<i8>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut length: size_t = 0;
    history_file = status_prompt_find_history_file();
    if history_file.is_null() {
        return;
    }
    (unsafe {
        log_debug(
            b"loading history from %s\0" as *const u8 as *const i8,
            history_file,
        )
    });
    f = unsafe { fopen(history_file, b"r\0" as *const u8 as *const i8) };
    if f.is_null() {
        (unsafe {
            log_debug(
                b"%s: %s\0" as *const u8 as *const i8,
                history_file,
                strerror(*__errno_location()),
            )
        });
        (unsafe { free(history_file as *mut ()) });
        return;
    }
    (unsafe { free(history_file as *mut ()) });
    loop {
        line = unsafe { fgetln(f, &mut length) };
        if line.is_null() {
            break;
        }
        if length > 0 as u64 {
            if (unsafe { *line.offset(length.wrapping_sub(1 as i32 as u64) as isize) }) as i32
                == '\n' as i32
            {
                (unsafe {
                    *line.offset(length.wrapping_sub(1 as i32 as u64) as isize) = '\0' as i32 as i8
                });
                status_prompt_add_typed_history(line);
            } else {
                tmp = (unsafe { xmalloc(length.wrapping_add(1 as i32 as u64)) }) as *mut i8;
                (unsafe {
                    memcpy(
                        tmp as *mut (),
                        line as *const (),
                        length,
                    )
                });
                (unsafe { *tmp.offset(length as isize) = '\0' as i32 as i8 });
                status_prompt_add_typed_history(tmp);
                (unsafe { free(tmp as *mut ()) });
            }
        }
    }
    (unsafe { fclose(f) });
}
#[no_mangle]
pub extern "C" fn status_prompt_save_history() {
    let mut f: *mut FILE = std::ptr::null_mut::<FILE>();
    let mut i: u_int = 0;
    let mut type_0: u_int = 0;
    let mut history_file: *mut i8 = std::ptr::null_mut::<i8>();
    history_file = status_prompt_find_history_file();
    if history_file.is_null() {
        return;
    }
    (unsafe {
        log_debug(
            b"saving history to %s\0" as *const u8 as *const i8,
            history_file,
        )
    });
    f = unsafe { fopen(history_file, b"w\0" as *const u8 as *const i8) };
    if f.is_null() {
        (unsafe {
            log_debug(
                b"%s: %s\0" as *const u8 as *const i8,
                history_file,
                strerror(*__errno_location()),
            )
        });
        (unsafe { free(history_file as *mut ()) });
        return;
    }
    (unsafe { free(history_file as *mut ()) });
    type_0 = 0 as u_int;
    while type_0 < 4 as u32 {
        i = 0 as u_int;
        while i < (unsafe { status_prompt_hsize[type_0 as usize] }) {
            (unsafe { fputs(prompt_type_strings[type_0 as usize], f) });
            (unsafe { fputc(':' as i32, f) });
            (unsafe {
                fputs(
                    *(status_prompt_hlist[type_0 as usize]).offset(i as isize),
                    f,
                )
            });
            (unsafe { fputc('\n' as i32, f) });
            i = i.wrapping_add(1);
        }
        type_0 = type_0.wrapping_add(1);
    }
    (unsafe { fclose(f) });
}
extern "C" fn status_timer_callback(mut _fd: i32, mut _events: i16, mut arg: *mut ()) {
    let mut c: *mut client = arg as *mut client;
    let mut s: *mut session = unsafe { (*c).session };
    let mut tv: timeval = timeval {
        tv_sec: 0,
        tv_usec: 0,
    };
    (unsafe { event_del(&mut (*c).status.timer) });
    if s.is_null() {
        return;
    }
    if (unsafe { (*c).message_string }).is_null() && (unsafe { (*c).prompt_string }).is_null() {
        (unsafe { (*c).flags |= 0x10 as i32 as u64 });
    }
    tv.tv_usec = 0 as __suseconds_t;
    tv.tv_sec = tv.tv_usec;
    tv.tv_sec = (unsafe {
        options_get_number((*s).options, b"status-interval\0" as *const u8 as *const i8)
    }) as __time_t;
    if tv.tv_sec != 0 as i64 {
        (unsafe { event_add(&mut (*c).status.timer, &mut tv) });
    }
    (unsafe {
        log_debug(
            b"client %p, status interval %d\0" as *const u8 as *const i8,
            c,
            tv.tv_sec as i32,
        )
    });
}
#[no_mangle]
pub extern "C" fn status_timer_start(mut c: *mut client) {
    let mut s: *mut session = unsafe { (*c).session };
    if (unsafe { event_initialized(&mut (*c).status.timer) }) != 0 {
        (unsafe { event_del(&mut (*c).status.timer) });
    } else {
        (unsafe {
            event_set(
                &mut (*c).status.timer,
                -(1 as i32), 0 as i16,
                Some(
                    status_timer_callback
                        as unsafe extern "C" fn(i32, i16, *mut ()) -> (),
                ),
                c as *mut (),
            )
        });
    }
    if !s.is_null()
        && (unsafe { options_get_number((*s).options, b"status\0" as *const u8 as *const i8) }) != 0
    {
        status_timer_callback(-(1 as i32), 0 as i16, c as *mut ());
    }
}
#[no_mangle]
pub extern "C" fn status_timer_start_all() {
    let mut c: *mut client = std::ptr::null_mut::<client>();
    c = unsafe { clients.tqh_first };
    while !c.is_null() {
        status_timer_start(c);
        c = unsafe { (*c).entry.tqe_next };
    }
}
#[no_mangle]
pub extern "C" fn status_update_cache(mut s: *mut session) {
    (unsafe {
        (*s).statuslines =
            options_get_number((*s).options, b"status\0" as *const u8 as *const i8) as u_int
    });
    if (unsafe { (*s).statuslines }) == 0 as u32 {
        (unsafe { (*s).statusat = -(1 as i32) });
    } else if (unsafe {
        options_get_number((*s).options, b"status-position\0" as *const u8 as *const i8)
    }) == 0 as i64
    {
        (unsafe { (*s).statusat = 0 });
    } else {
        (unsafe { (*s).statusat = 1 });
    };
}
#[no_mangle]
pub extern "C" fn status_at_line(mut c: *mut client) -> i32 {
    let mut s: *mut session = unsafe { (*c).session };
    if (unsafe { (*c).flags }) & (0x800000 as i32 | 0x2000 as i32) as u64 != 0 {
        return -(1 as i32);
    }
    if (unsafe { (*s).statusat }) != 1 {
        return unsafe { (*s).statusat };
    }
    return (unsafe { (*c).tty.sy }).wrapping_sub(status_line_size(c)) as i32;
}
#[no_mangle]
pub extern "C" fn status_line_size(mut c: *mut client) -> u_int {
    let mut s: *mut session = unsafe { (*c).session };
    if (unsafe { (*c).flags }) & (0x800000 as i32 | 0x2000 as i32) as u64 != 0 {
        return 0 as u_int;
    }
    if s.is_null() {
        return (unsafe {
            options_get_number(global_s_options, b"status\0" as *const u8 as *const i8)
        }) as u_int;
    }
    return unsafe { (*s).statuslines };
}
extern "C" fn status_prompt_line_at(mut c: *mut client) -> u_int {
    let mut s: *mut session = unsafe { (*c).session };
    if (unsafe { (*c).flags }) & (0x800000 as i32 | 0x2000 as i32) as u64 != 0 {
        return 1 as u_int;
    }
    return (unsafe {
        options_get_number((*s).options, b"message-line\0" as *const u8 as *const i8)
    }) as u_int;
}
#[no_mangle]
pub extern "C" fn status_get_range(
    mut c: *mut client,
    mut x: u_int,
    mut y: u_int,
) -> *mut style_range {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut sr: *mut style_range = std::ptr::null_mut::<style_range>();
    if y as u64
        >= (::core::mem::size_of::<[status_line_entry; 5]>() as u64)
            .wrapping_div(::core::mem::size_of::<status_line_entry>() as u64)
    {
        return std::ptr::null_mut::<style_range>();
    }
    sr = unsafe { (*sl).entries[y as usize].ranges.tqh_first };
    while !sr.is_null() {
        if x >= (unsafe { (*sr).start }) && x < (unsafe { (*sr).end }) {
            return sr;
        }
        sr = unsafe { (*sr).entry.tqe_next };
    }
    return std::ptr::null_mut::<style_range>();
}
extern "C" fn status_free_ranges(mut srs: *mut style_ranges) {
    let mut sr: *mut style_range = std::ptr::null_mut::<style_range>();
    let mut sr1: *mut style_range = std::ptr::null_mut::<style_range>();
    sr = unsafe { (*srs).tqh_first };
    while !sr.is_null() && {
        sr1 = unsafe { (*sr).entry.tqe_next }; 1 != 0
    } {
        if !(unsafe { (*sr).entry.tqe_next }).is_null() {
            (unsafe { (*(*sr).entry.tqe_next).entry.tqe_prev = (*sr).entry.tqe_prev });
        } else {
            (unsafe { (*srs).tqh_last = (*sr).entry.tqe_prev });
        }
        (unsafe { *(*sr).entry.tqe_prev = (*sr).entry.tqe_next });
        (unsafe { free(sr as *mut ()) });
        sr = sr1;
    }
}
extern "C" fn status_push_screen(mut c: *mut client) {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    if (unsafe { (*sl).active }) == (unsafe { &mut (*sl).screen }) as *mut screen {
        (unsafe { (*sl).active = xmalloc(::core::mem::size_of::<screen>() as u64) as *mut screen });
        (unsafe {
            screen_init(
                (*sl).active,
                (*c).tty.sx,
                status_line_size(c), 0 as u_int,
            )
        });
    }
    (unsafe { (*sl).references += 1 });
}
extern "C" fn status_pop_screen(mut c: *mut client) {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    (unsafe { (*sl).references -= 1 });
    if (unsafe { (*sl).references }) == 0 {
        (unsafe { screen_free((*sl).active) });
        (unsafe { free((*sl).active as *mut ()) });
        (unsafe { (*sl).active = &mut (*sl).screen });
    }
}
#[no_mangle]
pub extern "C" fn status_init(mut c: *mut client) {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut i: u_int = 0;
    i = 0 as u_int;
    while (i as u64)
        < (::core::mem::size_of::<[status_line_entry; 5]>() as u64)
            .wrapping_div(::core::mem::size_of::<status_line_entry>() as u64)
    {
        (unsafe {
            (*sl).entries[i as usize].ranges.tqh_first = std::ptr::null_mut::<style_range>()
        });
        (unsafe {
            (*sl).entries[i as usize].ranges.tqh_last =
                &mut (*((*sl).entries).as_mut_ptr().offset(i as isize))
                    .ranges
                    .tqh_first
        });
        i = i.wrapping_add(1);
    }
    (unsafe {
        screen_init(
            &mut (*sl).screen,
            (*c).tty.sx, 1 as u_int, 0 as u_int,
        )
    });
    (unsafe { (*sl).active = &mut (*sl).screen });
}
#[no_mangle]
pub extern "C" fn status_free(mut c: *mut client) {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut i: u_int = 0;
    i = 0 as u_int;
    while (i as u64)
        < (::core::mem::size_of::<[status_line_entry; 5]>() as u64)
            .wrapping_div(::core::mem::size_of::<status_line_entry>() as u64)
    {
        status_free_ranges(unsafe {
            &mut (*((*sl).entries).as_mut_ptr().offset(i as isize)).ranges
        });
        (unsafe { free((*sl).entries[i as usize].expanded as *mut ()) });
        i = i.wrapping_add(1);
    }
    if (unsafe { event_initialized(&mut (*sl).timer) }) != 0 {
        (unsafe { event_del(&mut (*sl).timer) });
    }
    if (unsafe { (*sl).active }) != (unsafe { &mut (*sl).screen }) as *mut screen {
        (unsafe { screen_free((*sl).active) });
        (unsafe { free((*sl).active as *mut ()) });
    }
    (unsafe { screen_free(&mut (*sl).screen) });
}
#[no_mangle]
pub extern "C" fn status_redraw(mut c: *mut client) -> i32 {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut sle: *mut status_line_entry = std::ptr::null_mut::<status_line_entry>();
    let mut s: *mut session = unsafe { (*c).session };
    let mut ctx: screen_write_ctx = screen_write_ctx {
        wp: std::ptr::null_mut::<window_pane>(),
        s: std::ptr::null_mut::<screen>(),
        flags: 0,
        init_ctx_cb: None,
        arg: std::ptr::null_mut::<()>(),
        item: std::ptr::null_mut::<screen_write_citem>(),
        scrolled: 0,
        bg: 0,
    };
    let mut gc: grid_cell = grid_cell {
        data: utf8_data {
            data: [0; 21],
            have: 0,
            size: 0,
            width: 0,
        },
        attr: 0,
        flags: 0,
        fg: 0,
        bg: 0,
        us: 0,
        link: 0,
    };
    let mut lines: u_int = 0;
    let mut i: u_int = 0;
    let mut n: u_int = 0;
    let mut width: u_int = unsafe { (*c).tty.sx };
    let mut flags: i32 = 0;
    let mut force: i32 = 0;
    let mut changed: i32 = 0;
    let mut fg: i32 = 0;
    let mut bg: i32 = 0;
    let mut o: *mut options_entry = std::ptr::null_mut::<options_entry>();
    let mut ov: *mut options_value = std::ptr::null_mut::<options_value>();
    let mut ft: *mut format_tree = std::ptr::null_mut::<format_tree>();
    let mut expanded: *mut i8 = std::ptr::null_mut::<i8>();
    (unsafe {
        log_debug(
            b"%s enter\0" as *const u8 as *const i8,
            (*::core::mem::transmute::<&[u8; 14], &[i8; 14]>(b"status_redraw\0")).as_ptr(),
        )
    });
    if (unsafe { (*sl).active }) != (unsafe { &mut (*sl).screen }) as *mut screen {
        (unsafe { fatalx(b"not the active screen\0" as *const u8 as *const i8) });
    }
    lines = status_line_size(c);
    if (unsafe { (*c).tty.sy }) == 0 as u32 || lines == 0 as u32 {
        return 1;
    }
    flags = 0x1 as i32;
    if (unsafe { (*c).flags }) & 0x80000 as i32 as u64 != 0 {
        flags |= 0x2 as i32;
    }
    ft = unsafe { format_create(c, std::ptr::null_mut::<cmdq_item>(), 0, flags) };
    (unsafe {
        format_defaults(
            ft,
            c,
            std::ptr::null_mut::<session>(),
            std::ptr::null_mut::<winlink>(),
            std::ptr::null_mut::<window_pane>(),
        )
    });
    (unsafe {
        style_apply(
            &mut gc,
            (*s).options,
            b"status-style\0" as *const u8 as *const i8,
            ft,
        )
    });
    fg = (unsafe { options_get_number((*s).options, b"status-fg\0" as *const u8 as *const i8) })
        as i32;
    if !(fg == 8 || fg == 9) {
        gc.fg = fg;
    }
    bg = (unsafe { options_get_number((*s).options, b"status-bg\0" as *const u8 as *const i8) })
        as i32;
    if !(bg == 8 || bg == 9) {
        gc.bg = bg;
    }
    if (unsafe { grid_cells_equal(&mut gc, &mut (*sl).style) }) == 0 {
        force = 1;
        (unsafe {
            memcpy(
                &mut (*sl).style as *mut grid_cell as *mut (),
                &mut gc as *mut grid_cell as *const (),
                ::core::mem::size_of::<grid_cell>() as u64,
            )
        });
    }
    if (unsafe { (*(*sl).screen.grid).sx }) != width
        || (unsafe { (*(*sl).screen.grid).sy }) != lines
    {
        (unsafe { screen_resize(&mut (*sl).screen, width, lines, 0) });
        force = 1;
        changed = force;
    }
    (unsafe { screen_write_start(&mut ctx, &mut (*sl).screen) });
    o = unsafe { options_get((*s).options, b"status-format\0" as *const u8 as *const i8) };
    if o.is_null() {
        n = 0 as u_int;
        while n < width.wrapping_mul(lines) {
            (unsafe { screen_write_putc(&mut ctx, &mut gc, ' ' as i32 as u_char) });
            n = n.wrapping_add(1);
        }
    } else {
        i = 0 as u_int;
        while i < lines {
            (unsafe { screen_write_cursormove(&mut ctx, 0, i as i32, 0) });
            ov = unsafe { options_array_get(o, i) };
            if ov.is_null() {
                n = 0 as u_int;
                while n < width {
                    (unsafe { screen_write_putc(&mut ctx, &mut gc, ' ' as i32 as u_char) });
                    n = n.wrapping_add(1);
                }
            } else {
                sle = (unsafe { &mut *((*sl).entries).as_mut_ptr().offset(i as isize) })
                    as *mut status_line_entry;
                expanded = unsafe { format_expand_time(ft, (*ov).string) };
                if force == 0
                    && !(unsafe { (*sle).expanded }).is_null()
                    && (unsafe { strcmp(expanded, (*sle).expanded) }) == 0
                {
                    (unsafe { free(expanded as *mut ()) });
                } else {
                    changed = 1;
                    n = 0 as u_int;
                    while n < width {
                        (unsafe { screen_write_putc(&mut ctx, &mut gc, ' ' as i32 as u_char) });
                        n = n.wrapping_add(1);
                    }
                    (unsafe { screen_write_cursormove(&mut ctx, 0, i as i32, 0) });
                    status_free_ranges(unsafe { &mut (*sle).ranges });
                    (unsafe {
                        format_draw(
                            &mut ctx,
                            &mut gc,
                            width,
                            expanded,
                            &mut (*sle).ranges, 0,
                        )
                    });
                    (unsafe { free((*sle).expanded as *mut ()) });
                    (unsafe { (*sle).expanded = expanded });
                }
            }
            i = i.wrapping_add(1);
        }
    }
    (unsafe { screen_write_stop(&mut ctx) });
    (unsafe { format_free(ft) });
    (unsafe {
        log_debug(
            b"%s exit: force=%d, changed=%d\0" as *const u8 as *const i8,
            (*::core::mem::transmute::<&[u8; 14], &[i8; 14]>(b"status_redraw\0")).as_ptr(),
            force,
            changed,
        )
    });
    return (force != 0 || changed != 0) as i32;
}
#[no_mangle]
pub unsafe extern "C" fn status_message_set(
    mut c: *mut client,
    mut delay: i32,
    mut ignore_styles: i32,
    mut ignore_keys: i32,
    mut fmt: *const i8,
    mut args: ...
) {
    let mut tv: timeval = timeval {
        tv_sec: 0,
        tv_usec: 0,
    };
    let mut ap: ::core::ffi::VaListImpl;
    let mut s: *mut i8 = std::ptr::null_mut::<i8>();
    ap = args.clone();
    xvasprintf(&mut s, fmt, ap.as_va_list());
    log_debug(
        b"%s: %s\0" as *const u8 as *const i8,
        (*::core::mem::transmute::<&[u8; 19], &[i8; 19]>(b"status_message_set\0")).as_ptr(),
        s,
    );
    if c.is_null() {
        server_add_message(b"message: %s\0" as *const u8 as *const i8, s);
        free(s as *mut ());
        return;
    }
    status_message_clear(c);
    status_push_screen(c);
    (*c).message_string = s;
    server_add_message(b"%s message: %s\0" as *const u8 as *const i8, (*c).name, s);
    if delay == -(1 as i32) {
        delay = options_get_number(
            (*(*c).session).options,
            b"display-time\0" as *const u8 as *const i8,
        ) as i32;
    }
    if delay > 0 {
        tv.tv_sec = (delay / 1000) as __time_t;
        tv.tv_usec = (delay % 1000) as i64 * 1000;
        if event_initialized(&mut (*c).message_timer) != 0 {
            event_del(&mut (*c).message_timer);
        }
        event_set(
            &mut (*c).message_timer,
            -(1 as i32), 0 as i16,
            Some(
                status_message_callback as unsafe extern "C" fn(i32, i16, *mut ()) -> (),
            ),
            c as *mut (),
        );
        event_add(&mut (*c).message_timer, &mut tv);
    }
    if delay != 0 {
        (*c).message_ignore_keys = ignore_keys;
    }
    (*c).message_ignore_styles = ignore_styles;
    (*c).tty.flags |= 0x1 as i32 | 0x2 as i32;
    (*c).flags |= 0x10 as i32 as u64;
}
#[no_mangle]
pub extern "C" fn status_message_clear(mut c: *mut client) {
    if (unsafe { (*c).message_string }).is_null() {
        return;
    }
    (unsafe { free((*c).message_string as *mut ()) });
    (unsafe { (*c).message_string = std::ptr::null_mut::<i8>() });
    if (unsafe { (*c).prompt_string }).is_null() {
        (unsafe { (*c).tty.flags &= !(0x1 as i32 | 0x2 as i32) });
    }
    (unsafe {
        (*c).flags = ((*c).flags as u64
            | ((0x8 as i32
                | 0x10 as i32
                | 0x1000000 as i32
                | 0x400 as i32
                | 0x2000000 as i32
                | KEYC_VI as i32) as u64
                | KEYC_SENT00 as u64)) as uint64_t
    });
    status_pop_screen(c);
}
extern "C" fn status_message_callback(mut _fd: i32, mut _event: i16, mut data: *mut ()) {
    let mut c: *mut client = data as *mut client;
    status_message_clear(c);
}
#[no_mangle]
pub extern "C" fn status_message_redraw(mut c: *mut client) -> i32 {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut ctx: screen_write_ctx = screen_write_ctx {
        wp: std::ptr::null_mut::<window_pane>(),
        s: std::ptr::null_mut::<screen>(),
        flags: 0,
        init_ctx_cb: None,
        arg: std::ptr::null_mut::<()>(),
        item: std::ptr::null_mut::<screen_write_citem>(),
        scrolled: 0,
        bg: 0,
    };
    let mut s: *mut session = unsafe { (*c).session };
    let mut old_screen: screen = screen {
        title: std::ptr::null_mut::<i8>(),
        path: std::ptr::null_mut::<i8>(),
        titles: std::ptr::null_mut::<screen_titles>(),
        grid: std::ptr::null_mut::<grid>(),
        cx: 0,
        cy: 0,
        cstyle: SCREEN_CURSOR_DEFAULT,
        default_cstyle: SCREEN_CURSOR_DEFAULT,
        ccolour: 0,
        default_ccolour: 0,
        rupper: 0,
        rlower: 0,
        mode: 0,
        default_mode: 0,
        saved_cx: 0,
        saved_cy: 0,
        saved_grid: std::ptr::null_mut::<grid>(),
        saved_cell: grid_cell {
            data: utf8_data {
                data: [0; 21],
                have: 0,
                size: 0,
                width: 0,
            },
            attr: 0,
            flags: 0,
            fg: 0,
            bg: 0,
            us: 0,
            link: 0,
        },
        saved_flags: 0,
        tabs: std::ptr::null_mut::<bitstr_t>(),
        sel: std::ptr::null_mut::<screen_sel>(),
        write_list: std::ptr::null_mut::<screen_write_cline>(),
        hyperlinks: std::ptr::null_mut::<hyperlinks>(),
    };
    let mut len: size_t = 0;
    let mut lines: u_int = 0;
    let mut offset: u_int = 0;
    let mut messageline: u_int = 0;
    let mut gc: grid_cell = grid_cell {
        data: utf8_data {
            data: [0; 21],
            have: 0,
            size: 0,
            width: 0,
        },
        attr: 0,
        flags: 0,
        fg: 0,
        bg: 0,
        us: 0,
        link: 0,
    };
    let mut ft: *mut format_tree = std::ptr::null_mut::<format_tree>();
    if (unsafe { (*c).tty.sx }) == 0 as u32 || (unsafe { (*c).tty.sy }) == 0 as u32 {
        return 0;
    }
    (unsafe {
        memcpy(
            &mut old_screen as *mut screen as *mut (),
            (*sl).active as *const (),
            ::core::mem::size_of::<screen>() as u64,
        )
    });
    lines = status_line_size(c);
    if lines <= 1 as u32 {
        lines = 1 as u_int;
    }
    (unsafe { screen_init((*sl).active, (*c).tty.sx, lines, 0 as u_int) });
    messageline = status_prompt_line_at(c);
    if messageline > lines.wrapping_sub(1 as i32 as u32) {
        messageline = lines.wrapping_sub(1 as i32 as u32);
    }
    len = unsafe { screen_write_strlen(b"%s\0" as *const u8 as *const i8, (*c).message_string) };
    if len > (unsafe { (*c).tty.sx }) as u64 {
        len = (unsafe { (*c).tty.sx }) as size_t;
    }
    ft = unsafe {
        format_create_defaults(
            std::ptr::null_mut::<cmdq_item>(),
            c,
            std::ptr::null_mut::<session>(),
            std::ptr::null_mut::<winlink>(),
            std::ptr::null_mut::<window_pane>(),
        )
    };
    (unsafe {
        style_apply(
            &mut gc,
            (*s).options,
            b"message-style\0" as *const u8 as *const i8,
            ft,
        )
    });
    (unsafe { format_free(ft) });
    (unsafe { screen_write_start(&mut ctx, (*sl).active) });
    (unsafe {
        screen_write_fast_copy(
            &mut ctx,
            &mut (*sl).screen, 0 as u_int, 0 as u_int,
            (*c).tty.sx,
            lines,
        )
    });
    (unsafe { screen_write_cursormove(&mut ctx, 0, messageline as i32, 0) });
    offset = 0 as u_int;
    while offset < (unsafe { (*c).tty.sx }) {
        (unsafe { screen_write_putc(&mut ctx, &mut gc, ' ' as i32 as u_char) });
        offset = offset.wrapping_add(1);
    }
    (unsafe { screen_write_cursormove(&mut ctx, 0, messageline as i32, 0) });
    if (unsafe { (*c).message_ignore_styles }) != 0 {
        (unsafe {
            screen_write_nputs(
                &mut ctx as *mut screen_write_ctx,
                len as ssize_t,
                &mut gc as *mut grid_cell,
                b"%s\0" as *const u8 as *const i8,
                (*c).message_string,
            )
        });
    } else {
        (unsafe {
            format_draw(
                &mut ctx,
                &mut gc,
                (*c).tty.sx,
                (*c).message_string,
                std::ptr::null_mut::<style_ranges>(), 0,
            )
        });
    }
    (unsafe { screen_write_stop(&mut ctx) });
    if (unsafe { grid_compare((*(*sl).active).grid, old_screen.grid) }) == 0 {
        (unsafe { screen_free(&mut old_screen) });
        return 0;
    }
    (unsafe { screen_free(&mut old_screen) });
    return 1;
}
extern "C" fn status_prompt_accept(
    mut _item: *mut cmdq_item,
    mut data: *mut (),
) -> cmd_retval {
    let mut c: *mut client = data as *mut client;
    if !(unsafe { (*c).prompt_string }).is_null() {
        (unsafe {
            ((*c).prompt_inputcb).expect("non-null function pointer")(
                c,
                (*c).prompt_data,
                b"y\0" as *const u8 as *const i8, 1,
            )
        });
        status_prompt_clear(c);
    }
    return CMD_RETURN_NORMAL;
}
#[no_mangle]
pub extern "C" fn status_prompt_set(
    mut c: *mut client,
    mut fs: *mut cmd_find_state,
    mut msg: *const i8,
    mut input: *const i8,
    mut inputcb: prompt_input_cb,
    mut freecb: prompt_free_cb,
    mut data: *mut (),
    mut flags: i32,
    mut prompt_type: prompt_type,
) {
    let mut ft: *mut format_tree = std::ptr::null_mut::<format_tree>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    (unsafe { server_client_clear_overlay(c) });
    if !fs.is_null() {
        ft = unsafe { format_create_from_state(std::ptr::null_mut::<cmdq_item>(), c, fs) };
    } else {
        ft = unsafe {
            format_create_defaults(
                std::ptr::null_mut::<cmdq_item>(),
                c,
                std::ptr::null_mut::<session>(),
                std::ptr::null_mut::<winlink>(),
                std::ptr::null_mut::<window_pane>(),
            )
        };
    }
    if input.is_null() {
        input = b"\0" as *const u8 as *const i8;
    }
    if flags & 0x8 as i32 != 0 {
        tmp = unsafe { xstrdup(input) };
    } else {
        tmp = unsafe { format_expand_time(ft, input) };
    }
    status_message_clear(c);
    status_prompt_clear(c);
    status_push_screen(c);
    (unsafe { (*c).prompt_string = format_expand_time(ft, msg) });
    if flags & 0x4 as i32 != 0 {
        (unsafe { (*c).prompt_last = xstrdup(tmp) });
        (unsafe { (*c).prompt_buffer = utf8_fromcstr(b"\0" as *const u8 as *const i8) });
    } else {
        (unsafe { (*c).prompt_last = std::ptr::null_mut::<i8>() });
        (unsafe { (*c).prompt_buffer = utf8_fromcstr(tmp) });
    }
    (unsafe { (*c).prompt_index = utf8_strlen((*c).prompt_buffer) });
    (unsafe { (*c).prompt_inputcb = inputcb });
    (unsafe { (*c).prompt_freecb = freecb });
    (unsafe { (*c).prompt_data = data });
    (unsafe {
        memset(
            ((*c).prompt_hindex).as_mut_ptr() as *mut (), 0,
            ::core::mem::size_of::<[u_int; 4]>() as u64,
        )
    });
    (unsafe { (*c).prompt_flags = flags });
    (unsafe { (*c).prompt_type = prompt_type });
    (unsafe { (*c).prompt_mode = PROMPT_ENTRY });
    if !flags & 0x4 as i32 != 0 {
        (unsafe { (*c).tty.flags |= 0x2 as i32 });
    }
    (unsafe { (*c).flags |= 0x10 as i32 as u64 });
    if flags & 0x4 as i32 != 0 {
        (unsafe {
            ((*c).prompt_inputcb).expect("non-null function pointer")(
                c,
                (*c).prompt_data,
                b"=\0" as *const u8 as *const i8, 0,
            )
        });
    }
    (unsafe { free(tmp as *mut ()) });
    (unsafe { format_free(ft) });
    if flags & 0x1 as i32 != 0 && flags & 0x20 as i32 != 0 {
        (unsafe {
            cmdq_append(
                c,
                cmdq_get_callback1(
                    b"status_prompt_accept\0" as *const u8 as *const i8,
                    Some(
                        status_prompt_accept
                            as unsafe extern "C" fn(
                                *mut cmdq_item,
                                *mut (),
                            ) -> cmd_retval,
                    ),
                    c as *mut (),
                ),
            )
        });
    }
}
#[no_mangle]
pub extern "C" fn status_prompt_clear(mut c: *mut client) {
    if (unsafe { (*c).prompt_string }).is_null() {
        return;
    }
    if (unsafe { ((*c).prompt_freecb).is_some() }) && !(unsafe { (*c).prompt_data }).is_null() {
        (unsafe { ((*c).prompt_freecb).expect("non-null function pointer")((*c).prompt_data) });
    }
    (unsafe { free((*c).prompt_last as *mut ()) });
    (unsafe { (*c).prompt_last = std::ptr::null_mut::<i8>() });
    (unsafe { free((*c).prompt_string as *mut ()) });
    (unsafe { (*c).prompt_string = std::ptr::null_mut::<i8>() });
    (unsafe { free((*c).prompt_buffer as *mut ()) });
    (unsafe { (*c).prompt_buffer = std::ptr::null_mut::<utf8_data>() });
    (unsafe { free((*c).prompt_saved as *mut ()) });
    (unsafe { (*c).prompt_saved = std::ptr::null_mut::<utf8_data>() });
    (unsafe { (*c).tty.flags &= !(0x1 as i32 | 0x2 as i32) });
    (unsafe {
        (*c).flags = ((*c).flags as u64
            | ((0x8 as i32
                | 0x10 as i32
                | 0x1000000 as i32
                | 0x400 as i32
                | 0x2000000 as i32
                | KEYC_VI as i32) as u64
                | KEYC_SENT00 as u64)) as uint64_t
    });
    status_pop_screen(c);
}
#[no_mangle]
pub extern "C" fn status_prompt_update(
    mut c: *mut client,
    mut msg: *const i8,
    mut input: *const i8,
) {
    let mut ft: *mut format_tree = std::ptr::null_mut::<format_tree>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    ft = unsafe { format_create(c, std::ptr::null_mut::<cmdq_item>(), 0, 0) };
    (unsafe {
        format_defaults(
            ft,
            c,
            std::ptr::null_mut::<session>(),
            std::ptr::null_mut::<winlink>(),
            std::ptr::null_mut::<window_pane>(),
        )
    });
    tmp = unsafe { format_expand_time(ft, input) };
    (unsafe { free((*c).prompt_string as *mut ()) });
    (unsafe { (*c).prompt_string = format_expand_time(ft, msg) });
    (unsafe { free((*c).prompt_buffer as *mut ()) });
    (unsafe { (*c).prompt_buffer = utf8_fromcstr(tmp) });
    (unsafe { (*c).prompt_index = utf8_strlen((*c).prompt_buffer) });
    (unsafe {
        memset(
            ((*c).prompt_hindex).as_mut_ptr() as *mut (), 0,
            ::core::mem::size_of::<[u_int; 4]>() as u64,
        )
    });
    (unsafe { (*c).flags |= 0x10 as i32 as u64 });
    (unsafe { free(tmp as *mut ()) });
    (unsafe { format_free(ft) });
}
extern "C" fn status_prompt_redraw_character(
    mut ctx: *mut screen_write_ctx,
    mut offset: u_int,
    mut pwidth: u_int,
    mut width: *mut u_int,
    mut gc: *mut grid_cell,
    mut ud: *const utf8_data,
) -> i32 {
    let mut ch: u_char = 0;
    if (unsafe { *width }) < offset {
        (unsafe { *width = (*width as u32).wrapping_add((*ud).width as u32) as u_int as u_int });
        return 1;
    }
    if (unsafe { *width }) >= offset.wrapping_add(pwidth) {
        return 0;
    }
    (unsafe { *width = (*width as u32).wrapping_add((*ud).width as u32) as u_int as u_int });
    if (unsafe { *width }) > offset.wrapping_add(pwidth) {
        return 0;
    }
    ch = unsafe { *((*ud).data).as_ptr() };
    if (unsafe { (*ud).size }) as i32 == 1
        && (ch as i32 <= 0x1f as i32 || ch as i32 == 0x7f as i32)
    {
        (unsafe { (*gc).data.data[0 as i32 as usize] = '^' as i32 as u_char });
        (unsafe {
            (*gc).data.data[1 as i32 as usize] = (if ch as i32 == 0x7f as i32 {
                '?' as i32
            } else {
                ch as i32 | 0x40 as i32
            }) as u_char
        });
        (unsafe { (*gc).data.have = 2 as u_char });
        (unsafe { (*gc).data.size = (*gc).data.have });
        (unsafe { (*gc).data.width = 2 as u_char });
    } else {
        (unsafe { utf8_copy(&mut (*gc).data, ud) });
    }
    (unsafe { screen_write_cell(ctx, gc) });
    return 1;
}
extern "C" fn status_prompt_redraw_quote(
    mut c: *const client,
    mut pcursor: u_int,
    mut ctx: *mut screen_write_ctx,
    mut offset: u_int,
    mut pwidth: u_int,
    mut width: *mut u_int,
    mut gc: *mut grid_cell,
) -> i32 {
    let mut ud: utf8_data = utf8_data {
        data: [0; 21],
        have: 0,
        size: 0,
        width: 0,
    };
    if (unsafe { (*c).prompt_flags }) & 0x40 as i32 != 0
        && (unsafe { (*(*ctx).s).cx }) == pcursor.wrapping_add(1 as i32 as u32)
    {
        (unsafe { utf8_set(&mut ud, '^' as i32 as u_char) });
        return status_prompt_redraw_character(ctx, offset, pwidth, width, gc, &mut ud);
    }
    return 1;
}
#[no_mangle]
pub extern "C" fn status_prompt_redraw(mut c: *mut client) -> i32 {
    let mut sl: *mut status_line = unsafe { &mut (*c).status };
    let mut ctx: screen_write_ctx = screen_write_ctx {
        wp: std::ptr::null_mut::<window_pane>(),
        s: std::ptr::null_mut::<screen>(),
        flags: 0,
        init_ctx_cb: None,
        arg: std::ptr::null_mut::<()>(),
        item: std::ptr::null_mut::<screen_write_citem>(),
        scrolled: 0,
        bg: 0,
    };
    let mut s: *mut session = unsafe { (*c).session };
    let mut old_screen: screen = screen {
        title: std::ptr::null_mut::<i8>(),
        path: std::ptr::null_mut::<i8>(),
        titles: std::ptr::null_mut::<screen_titles>(),
        grid: std::ptr::null_mut::<grid>(),
        cx: 0,
        cy: 0,
        cstyle: SCREEN_CURSOR_DEFAULT,
        default_cstyle: SCREEN_CURSOR_DEFAULT,
        ccolour: 0,
        default_ccolour: 0,
        rupper: 0,
        rlower: 0,
        mode: 0,
        default_mode: 0,
        saved_cx: 0,
        saved_cy: 0,
        saved_grid: std::ptr::null_mut::<grid>(),
        saved_cell: grid_cell {
            data: utf8_data {
                data: [0; 21],
                have: 0,
                size: 0,
                width: 0,
            },
            attr: 0,
            flags: 0,
            fg: 0,
            bg: 0,
            us: 0,
            link: 0,
        },
        saved_flags: 0,
        tabs: std::ptr::null_mut::<bitstr_t>(),
        sel: std::ptr::null_mut::<screen_sel>(),
        write_list: std::ptr::null_mut::<screen_write_cline>(),
        hyperlinks: std::ptr::null_mut::<hyperlinks>(),
    };
    let mut i: u_int = 0;
    let mut lines: u_int = 0;
    let mut offset: u_int = 0;
    let mut left: u_int = 0;
    let mut start: u_int = 0;
    let mut width: u_int = 0;
    let mut n: u_int = 0;
    let mut pcursor: u_int = 0;
    let mut pwidth: u_int = 0;
    let mut promptline: u_int = 0;
    let mut gc: grid_cell = grid_cell {
        data: utf8_data {
            data: [0; 21],
            have: 0,
            size: 0,
            width: 0,
        },
        attr: 0,
        flags: 0,
        fg: 0,
        bg: 0,
        us: 0,
        link: 0,
    };
    let mut ft: *mut format_tree = std::ptr::null_mut::<format_tree>();
    if (unsafe { (*c).tty.sx }) == 0 as u32 || (unsafe { (*c).tty.sy }) == 0 as u32 {
        return 0;
    }
    (unsafe {
        memcpy(
            &mut old_screen as *mut screen as *mut (),
            (*sl).active as *const (),
            ::core::mem::size_of::<screen>() as u64,
        )
    });
    lines = status_line_size(c);
    if lines <= 1 as u32 {
        lines = 1 as u_int;
    }
    (unsafe { screen_init((*sl).active, (*c).tty.sx, lines, 0 as u_int) });
    n = (unsafe {
        options_get_number(
            (*s).options,
            b"prompt-cursor-colour\0" as *const u8 as *const i8,
        )
    }) as u_int;
    (unsafe { (*(*sl).active).default_ccolour = n as i32 });
    n = (unsafe {
        options_get_number(
            (*s).options,
            b"prompt-cursor-style\0" as *const u8 as *const i8,
        )
    }) as u_int;
    (unsafe {
        screen_set_cursor_style(
            n,
            &mut (*(*sl).active).default_cstyle,
            &mut (*(*sl).active).default_mode,
        )
    });
    promptline = status_prompt_line_at(c);
    if promptline > lines.wrapping_sub(1 as i32 as u32) {
        promptline = lines.wrapping_sub(1 as i32 as u32);
    }
    ft = unsafe {
        format_create_defaults(
            std::ptr::null_mut::<cmdq_item>(),
            c,
            std::ptr::null_mut::<session>(),
            std::ptr::null_mut::<winlink>(),
            std::ptr::null_mut::<window_pane>(),
        )
    };
    if (unsafe { (*c).prompt_mode }) as u32 == PROMPT_COMMAND as i32 as u32 {
        (unsafe {
            style_apply(
                &mut gc,
                (*s).options,
                b"message-command-style\0" as *const u8 as *const i8,
                ft,
            )
        });
    } else {
        (unsafe {
            style_apply(
                &mut gc,
                (*s).options,
                b"message-style\0" as *const u8 as *const i8,
                ft,
            )
        });
    }
    (unsafe { format_free(ft) });
    start = unsafe { format_width((*c).prompt_string) };
    if start > (unsafe { (*c).tty.sx }) {
        start = unsafe { (*c).tty.sx };
    }
    (unsafe { screen_write_start(&mut ctx, (*sl).active) });
    (unsafe {
        screen_write_fast_copy(
            &mut ctx,
            &mut (*sl).screen, 0 as u_int, 0 as u_int,
            (*c).tty.sx,
            lines,
        )
    });
    (unsafe { screen_write_cursormove(&mut ctx, 0, promptline as i32, 0) });
    offset = 0 as u_int;
    while offset < (unsafe { (*c).tty.sx }) {
        (unsafe { screen_write_putc(&mut ctx, &mut gc, ' ' as i32 as u_char) });
        offset = offset.wrapping_add(1);
    }
    (unsafe { screen_write_cursormove(&mut ctx, 0, promptline as i32, 0) });
    (unsafe {
        format_draw(
            &mut ctx,
            &mut gc,
            start,
            (*c).prompt_string,
            std::ptr::null_mut::<style_ranges>(), 0,
        )
    });
    (unsafe { screen_write_cursormove(&mut ctx, start as i32, promptline as i32, 0) });
    left = (unsafe { (*c).tty.sx }).wrapping_sub(start);
    if left != 0 as u32 {
        pcursor = unsafe { utf8_strwidth((*c).prompt_buffer, (*c).prompt_index as ssize_t) };
        pwidth = unsafe { utf8_strwidth((*c).prompt_buffer, -(1 as i32) as ssize_t) };
        if (unsafe { (*c).prompt_flags }) & 0x40 as i32 != 0 {
            pwidth = pwidth.wrapping_add(1);
        }
        if pcursor >= left {
            offset = pcursor.wrapping_sub(left).wrapping_add(1 as i32 as u32);
            pwidth = left;
        } else {
            offset = 0 as u_int;
        }
        if pwidth > left {
            pwidth = left;
        }
        (unsafe { (*c).prompt_cursor = start.wrapping_add(pcursor).wrapping_sub(offset) as i32 });
        width = 0 as u_int;
        i = 0 as u_int;
        while (unsafe { (*((*c).prompt_buffer).offset(i as isize)).size }) as i32 != 0 {
            if status_prompt_redraw_quote(c, pcursor, &mut ctx, offset, pwidth, &mut width, &mut gc)
                == 0
            {
                break;
            }
            if status_prompt_redraw_character(
                &mut ctx,
                offset,
                pwidth,
                &mut width,
                &mut gc,
                unsafe { &mut *((*c).prompt_buffer).offset(i as isize) },
            ) == 0
            {
                break;
            }
            i = i.wrapping_add(1);
        }
        status_prompt_redraw_quote(c, pcursor, &mut ctx, offset, pwidth, &mut width, &mut gc);
    }
    (unsafe { screen_write_stop(&mut ctx) });
    if (unsafe { grid_compare((*(*sl).active).grid, old_screen.grid) }) == 0 {
        (unsafe { screen_free(&mut old_screen) });
        return 0;
    }
    (unsafe { screen_free(&mut old_screen) });
    return 1;
}
extern "C" fn status_prompt_in_list(mut ws: *const i8, mut ud: *const utf8_data) -> i32 {
    if (unsafe { (*ud).size }) as i32 != 1 || (unsafe { (*ud).width }) as i32 != 1 {
        return 0;
    }
    return ((unsafe { strchr(ws, *((*ud).data).as_ptr() as i32) })
        != std::ptr::null_mut::<()>() as *mut i8) as i32;
}
extern "C" fn status_prompt_space(mut ud: *const utf8_data) -> i32 {
    if (unsafe { (*ud).size }) as i32 != 1 || (unsafe { (*ud).width }) as i32 != 1 {
        return 0;
    }
    return ((unsafe { *((*ud).data).as_ptr() }) as i32 == ' ' as i32) as i32;
}
extern "C" fn status_prompt_translate_key(
    mut c: *mut client,
    mut key: key_code,
    mut new_key: *mut key_code,
) -> i32 {
    if (unsafe { (*c).prompt_mode }) as u32 == PROMPT_ENTRY as i32 as u32 {
        match key {
            35184372088929 | 35184372088931 | 35184372088933 | 35184372088935 | 35184372088936
            | 9 | 35184372088939 | 35184372088942 | 35184372088944 | 35184372088948
            | 35184372088949 | 35184372088950 | 35184372088951 | 35184372088953 | 10 | 13
            | 35184373195376 | 35184373195377 | 1106522 | 1106536 | 1106543 | 1106538 | 1106537
            | 1106544 | 1106545 | 1106542 => {
                (unsafe { *new_key = key });
                return 1;
            }
            27 => {
                (unsafe { (*c).prompt_mode = PROMPT_COMMAND });
                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                return 0;
            }
            _ => {}
        }
        (unsafe { *new_key = key });
        return 2;
    }
    match key {
        1106522 => {
            (unsafe { *new_key = KEYC_LEFT as i32 as key_code });
            return 1;
        }
        65 | 73 | 67 | 115 | 97 => {
            (unsafe { (*c).prompt_mode = PROMPT_ENTRY });
            (unsafe { (*c).flags |= 0x10 as i32 as u64 });
        }
        83 => {
            (unsafe { (*c).prompt_mode = PROMPT_ENTRY });
            (unsafe { (*c).flags |= 0x10 as i32 as u64 });
            (unsafe { *new_key = 'u' as i32 as u64 | KEYC_VI0000 as u64 });
            return 1;
        }
        105 | 27 => {
            (unsafe { (*c).prompt_mode = PROMPT_ENTRY });
            (unsafe { (*c).flags |= 0x10 as i32 as u64 });
            return 0;
        }
        _ => {}
    }
    match key {
        65 | 36 => {
            (unsafe { *new_key = KEYC_END as i32 as key_code });
            return 1;
        }
        73 | 48 | 94 => {
            (unsafe { *new_key = KEYC_HOME as i32 as key_code });
            return 1;
        }
        67 | 68 => {
            (unsafe { *new_key = 'k' as i32 as u64 | KEYC_VI0000 as u64 });
            return 1;
        }
        1106522 | 88 => {
            (unsafe { *new_key = KEYC_BSPACE as i32 as key_code });
            return 1;
        }
        98 => {
            (unsafe { *new_key = 'b' as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 });
            return 1;
        }
        66 => {
            (unsafe { *new_key = 'B' as i32 as u64 | KEYC_VI000000 as u64 });
            return 1;
        }
        100 => {
            (unsafe { *new_key = 'u' as i32 as u64 | KEYC_VI0000 as u64 });
            return 1;
        }
        101 => {
            (unsafe { *new_key = 'e' as i32 as u64 | KEYC_VI000000 as u64 });
            return 1;
        }
        69 => {
            (unsafe { *new_key = 'E' as i32 as u64 | KEYC_VI000000 as u64 });
            return 1;
        }
        119 => {
            (unsafe { *new_key = 'w' as i32 as u64 | KEYC_VI000000 as u64 });
            return 1;
        }
        87 => {
            (unsafe { *new_key = 'W' as i32 as u64 | KEYC_VI000000 as u64 });
            return 1;
        }
        112 => {
            (unsafe { *new_key = 'y' as i32 as u64 | KEYC_VI0000 as u64 });
            return 1;
        }
        113 => {
            (unsafe { *new_key = 'c' as i32 as u64 | KEYC_VI0000 as u64 });
            return 1;
        }
        115 | 1106536 | 120 => {
            (unsafe { *new_key = KEYC_DC as i32 as key_code });
            return 1;
        }
        1106543 | 106 => {
            (unsafe { *new_key = KEYC_DOWN as i32 as key_code });
            return 1;
        }
        1106544 | 104 => {
            (unsafe { *new_key = KEYC_LEFT as i32 as key_code });
            return 1;
        }
        97 | 1106545 | 108 => {
            (unsafe { *new_key = KEYC_RIGHT as i32 as key_code });
            return 1;
        }
        1106542 | 107 => {
            (unsafe { *new_key = KEYC_UP as i32 as key_code });
            return 1;
        }
        35184372088936 | 35184372088931 | 10 | 13 => return 1,
        _ => {}
    }
    return 0;
}
extern "C" fn status_prompt_paste(mut c: *mut client) -> i32 {
    let mut pb: *mut paste_buffer = std::ptr::null_mut::<paste_buffer>();
    let mut bufdata: *const i8 = std::ptr::null::<i8>();
    let mut size: size_t = 0;
    let mut n: size_t = 0;
    let mut bufsize: size_t = 0;
    let mut i: u_int = 0;
    let mut ud: *mut utf8_data = std::ptr::null_mut::<utf8_data>();
    let mut udp: *mut utf8_data = std::ptr::null_mut::<utf8_data>();
    let mut more: utf8_state = UTF8_MORE;
    size = unsafe { utf8_strlen((*c).prompt_buffer) };
    if !(unsafe { (*c).prompt_saved }).is_null() {
        ud = unsafe { (*c).prompt_saved };
        n = unsafe { utf8_strlen((*c).prompt_saved) };
    } else {
        pb = unsafe { paste_get_top(std::ptr::null_mut::<*const i8>()) };
        if pb.is_null() {
            return 0;
        }
        bufdata = unsafe { paste_buffer_data(pb, &mut bufsize) };
        udp = (unsafe {
            xreallocarray(
                std::ptr::null_mut::<()>(),
                bufsize.wrapping_add(1 as i32 as u64),
                ::core::mem::size_of::<utf8_data>() as u64,
            )
        }) as *mut utf8_data;
        ud = udp;
        i = 0 as u_int;
        while i as u64 != bufsize {
            more = unsafe { utf8_open(udp, *bufdata.offset(i as isize) as u_char) };
            if more as u32 == UTF8_MORE as i32 as u32 {
                loop {
                    i = i.wrapping_add(1);
                    if !(i as u64 != bufsize && more as u32 == UTF8_MORE as i32 as u32) {
                        break;
                    }
                    more = unsafe { utf8_append(udp, *bufdata.offset(i as isize) as u_char) };
                }
                if more as u32 == UTF8_DONE as i32 as u32 {
                    udp = unsafe { udp.offset(1) };
                    continue;
                } else {
                    i = (i as u32).wrapping_sub((unsafe { (*udp).have }) as u32) as u_int as u_int;
                }
            }
            if (unsafe { *bufdata.offset(i as isize) }) as i32 <= 31
                || (unsafe { *bufdata.offset(i as isize) }) as i32 >= 127
            {
                break;
            }
            (unsafe { utf8_set(udp, *bufdata.offset(i as isize) as u_char) });
            udp = unsafe { udp.offset(1) };
            i = i.wrapping_add(1);
        }
        (unsafe { (*udp).size = 0 as u_char });
        n = (unsafe { udp.offset_from(ud) }) as i64 as size_t;
    }
    if n != 0 as u64 {
        (unsafe {
            (*c).prompt_buffer = xreallocarray(
                (*c).prompt_buffer as *mut (),
                size.wrapping_add(n).wrapping_add(1 as i32 as u64),
                ::core::mem::size_of::<utf8_data>() as u64,
            ) as *mut utf8_data
        });
        if (unsafe { (*c).prompt_index }) == size {
            (unsafe {
                memcpy(
                    ((*c).prompt_buffer).offset((*c).prompt_index as isize) as *mut (),
                    ud as *const (),
                    n.wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
                )
            });
            (unsafe {
                (*c).prompt_index = ((*c).prompt_index as u64).wrapping_add(n) as size_t as size_t
            });
            (unsafe {
                (*((*c).prompt_buffer).offset((*c).prompt_index as isize)).size = 0 as u_char
            });
        } else {
            (unsafe {
                memmove(
                    ((*c).prompt_buffer)
                        .offset((*c).prompt_index as isize)
                        .offset(n as isize) as *mut (),
                    ((*c).prompt_buffer).offset((*c).prompt_index as isize) as *const (),
                    size.wrapping_add(1 as i32 as u64)
                        .wrapping_sub((*c).prompt_index)
                        .wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
                )
            });
            (unsafe {
                memcpy(
                    ((*c).prompt_buffer).offset((*c).prompt_index as isize) as *mut (),
                    ud as *const (),
                    n.wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
                )
            });
            (unsafe {
                (*c).prompt_index = ((*c).prompt_index as u64).wrapping_add(n) as size_t as size_t
            });
        }
    }
    if ud != (unsafe { (*c).prompt_saved }) {
        (unsafe { free(ud as *mut ()) });
    }
    return 1;
}
extern "C" fn status_prompt_replace_complete(mut c: *mut client, mut s: *const i8) -> i32 {
    let mut word: [i8; 64] = [0; 64];
    let mut allocated: *mut i8 = std::ptr::null_mut::<i8>();
    let mut size: size_t = 0;
    let mut n: size_t = 0;
    let mut off: size_t = 0;
    let mut idx: size_t = 0;
    let mut used: size_t = 0;
    let mut first: *mut utf8_data = std::ptr::null_mut::<utf8_data>();
    let mut last: *mut utf8_data = std::ptr::null_mut::<utf8_data>();
    let mut ud: *mut utf8_data = std::ptr::null_mut::<utf8_data>();
    idx = unsafe { (*c).prompt_index };
    if idx != 0 as u64 {
        idx = idx.wrapping_sub(1);
    }
    size = unsafe { utf8_strlen((*c).prompt_buffer) };
    first = (unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) as *mut utf8_data;
    while first > (unsafe { (*c).prompt_buffer }) && status_prompt_space(first) == 0 {
        first = unsafe { first.offset(-1) };
    }
    while (unsafe { (*first).size }) as i32 != 0 && status_prompt_space(first) != 0 {
        first = unsafe { first.offset(1) };
    }
    last = (unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) as *mut utf8_data;
    while (unsafe { (*last).size }) as i32 != 0 && status_prompt_space(last) == 0 {
        last = unsafe { last.offset(1) };
    }
    while last > (unsafe { (*c).prompt_buffer }) && status_prompt_space(last) != 0 {
        last = unsafe { last.offset(-1) };
    }
    if (unsafe { (*last).size }) as i32 != 0 {
        last = unsafe { last.offset(1) };
    }
    if last < first {
        return 0;
    }
    if s.is_null() {
        used = 0 as size_t;
        ud = first;
        while ud < last {
            if used.wrapping_add((unsafe { (*ud).size }) as u64)
                >= ::core::mem::size_of::<[i8; 64]>() as u64
            {
                break;
            }
            (unsafe {
                memcpy(
                    word.as_mut_ptr().offset(used as isize) as *mut (),
                    ((*ud).data).as_mut_ptr() as *const (),
                    (*ud).size as u64,
                )
            });
            used = (used as u64).wrapping_add((unsafe { (*ud).size }) as u64) as size_t as size_t;
            ud = unsafe { ud.offset(1) };
        }
        if ud != last {
            return 0;
        }
        word[used as usize] = '\0' as i32 as i8;
    }
    if s.is_null() {
        allocated = status_prompt_complete(
            c,
            word.as_mut_ptr(),
            (unsafe { first.offset_from((*c).prompt_buffer) }) as i64 as u_int,
        );
        if allocated.is_null() {
            return 0;
        }
        s = allocated;
    }
    n = size
        .wrapping_sub((unsafe { last.offset_from((*c).prompt_buffer) }) as i64 as u64)
        .wrapping_add(1 as i32 as u64);
    (unsafe {
        memmove(
            first as *mut (),
            last as *const (),
            n.wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
        )
    });
    size = (size as u64).wrapping_sub((unsafe { last.offset_from(first) }) as i64 as u64) as size_t
        as size_t;
    size = (size as u64).wrapping_add(unsafe { strlen(s) }) as size_t as size_t;
    off = (unsafe { first.offset_from((*c).prompt_buffer) }) as i64 as size_t;
    (unsafe {
        (*c).prompt_buffer = xreallocarray(
            (*c).prompt_buffer as *mut (),
            size.wrapping_add(1 as i32 as u64),
            ::core::mem::size_of::<utf8_data>() as u64,
        ) as *mut utf8_data
    });
    first = unsafe { ((*c).prompt_buffer).offset(off as isize) };
    (unsafe {
        memmove(
            first.offset(strlen(s) as isize) as *mut (),
            first as *const (),
            n.wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
        )
    });
    idx = 0 as size_t;
    while idx < (unsafe { strlen(s) }) {
        (unsafe {
            utf8_set(
                &mut *first.offset(idx as isize),
                *s.offset(idx as isize) as u_char,
            )
        });
        idx = idx.wrapping_add(1);
    }
    (unsafe {
        (*c).prompt_index =
            (first.offset_from((*c).prompt_buffer) as i64 as u64).wrapping_add(strlen(s))
    });
    (unsafe { free(allocated as *mut ()) });
    return 1;
}
extern "C" fn status_prompt_forward_word(
    mut c: *mut client,
    mut size: size_t,
    mut vi: i32,
    mut separators: *const i8,
) {
    let mut idx: size_t = unsafe { (*c).prompt_index };
    let mut word_is_separators: i32 = 0;
    if vi == 0 {
        while idx != size
            && status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) != 0
        {
            idx = idx.wrapping_add(1);
        }
    }
    if idx == size {
        (unsafe { (*c).prompt_index = idx });
        return;
    }
    word_is_separators = (status_prompt_in_list(separators, unsafe {
        &mut *((*c).prompt_buffer).offset(idx as isize)
    }) != 0
        && status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) == 0)
        as i32;
    loop {
        idx = idx.wrapping_add(1);
        if status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) != 0 {
            if vi != 0 {
                while idx != size
                    && status_prompt_space(unsafe {
                        &mut *((*c).prompt_buffer).offset(idx as isize)
                    }) != 0
                {
                    idx = idx.wrapping_add(1);
                }
            }
            break;
        } else if !(idx != size
            && word_is_separators
                == status_prompt_in_list(separators, unsafe {
                    &mut *((*c).prompt_buffer).offset(idx as isize)
                }))
        {
            break;
        }
    }
    (unsafe { (*c).prompt_index = idx });
}
extern "C" fn status_prompt_end_word(
    mut c: *mut client,
    mut size: size_t,
    mut separators: *const i8,
) {
    let mut idx: size_t = unsafe { (*c).prompt_index };
    let mut word_is_separators: i32 = 0;
    if idx == size {
        return;
    }
    loop {
        idx = idx.wrapping_add(1);
        if idx == size {
            (unsafe { (*c).prompt_index = idx });
            return;
        }
        if status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) == 0 {
            break;
        }
    }
    word_is_separators = status_prompt_in_list(separators, unsafe {
        &mut *((*c).prompt_buffer).offset(idx as isize)
    });
    loop {
        idx = idx.wrapping_add(1);
        if idx == size {
            break;
        }
        if !(status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) == 0
            && word_is_separators
                == status_prompt_in_list(separators, unsafe {
                    &mut *((*c).prompt_buffer).offset(idx as isize)
                }))
        {
            break;
        }
    }
    (unsafe { (*c).prompt_index = idx.wrapping_sub(1 as i32 as u64) });
}
extern "C" fn status_prompt_backward_word(mut c: *mut client, mut separators: *const i8) {
    let mut idx: size_t = unsafe { (*c).prompt_index };
    let mut word_is_separators: i32 = 0;
    while idx != 0 as u64 {
        idx = idx.wrapping_sub(1);
        if status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) == 0 {
            break;
        }
    }
    word_is_separators = status_prompt_in_list(separators, unsafe {
        &mut *((*c).prompt_buffer).offset(idx as isize)
    });
    while idx != 0 as u64 {
        idx = idx.wrapping_sub(1);
        if !(status_prompt_space(unsafe { &mut *((*c).prompt_buffer).offset(idx as isize) }) != 0
            || word_is_separators
                != status_prompt_in_list(separators, unsafe {
                    &mut *((*c).prompt_buffer).offset(idx as isize)
                }))
        {
            continue;
        }
        idx = idx.wrapping_add(1);
        break;
    }
    (unsafe { (*c).prompt_index = idx });
}
#[no_mangle]
pub extern "C" fn status_prompt_key(mut c: *mut client, mut key: key_code) -> i32 {
    let mut current_block: u64;
    let mut oo: *mut options = unsafe { (*(*c).session).options };
    let mut s: *mut i8 = std::ptr::null_mut::<i8>();
    let mut cp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut prefix: i8 = '=' as i32 as i8;
    let mut histstr: *const i8 = std::ptr::null::<i8>();
    let mut separators: *const i8 = std::ptr::null::<i8>();
    let mut keystring: *const i8 = std::ptr::null::<i8>();
    let mut size: size_t = 0;
    let mut idx: size_t = 0;
    let mut tmp: utf8_data = utf8_data {
        data: [0; 21],
        have: 0,
        size: 0,
        width: 0,
    };
    let mut keys: i32 = 0;
    let mut word_is_separators: i32 = 0;
    if (unsafe { (*c).prompt_flags }) & 0x10 as i32 != 0 {
        keystring = unsafe { key_string_lookup_key(key, 0) };
        (unsafe {
            ((*c).prompt_inputcb).expect("non-null function pointer")(
                c,
                (*c).prompt_data,
                keystring, 1,
            )
        });
        status_prompt_clear(c);
        return 0;
    }
    size = unsafe { utf8_strlen((*c).prompt_buffer) };
    if (unsafe { (*c).prompt_flags }) & 0x2 as i32 != 0 {
        if key >= '0' as i32 as u64 && key <= '9' as i32 as u64 {
            current_block = 7173793139323517425;
        } else {
            s = unsafe { utf8_tocstr((*c).prompt_buffer) };
            (unsafe {
                ((*c).prompt_inputcb).expect("non-null function pointer")(
                    c,
                    (*c).prompt_data,
                    s, 1,
                )
            });
            status_prompt_clear(c);
            (unsafe { free(s as *mut ()) });
            return 1;
        }
    } else {
        key &= !(KEYC_MASK_FLAGS000000 as u64);
        if (unsafe { (*c).prompt_flags }) & (0x1 as i32 | 0x40 as i32) != 0 {
            if key & 0xfffffffffff as u64 == KEYC_BSPACE as i32 as u64 {
                key = 0x7f as i32 as key_code;
            } else if key & 0xfffffffffff as u64 > 0x7f as i32 as u64 {
                if !(key & 0xfffffffffff as u64 > 0x7f as i32 as u64
                    && ((key & 0xfffffffffff as u64) < 0x10e000 as u64
                        || key & 0xfffffffffff as u64 >= KEYC_BASE_END as i32 as u64)
                    && ((key & 0xfffffffffff as u64) < 0x10f000 as u64
                        || key & 0xfffffffffff as u64
                            >= (0x10f000 as u64).wrapping_add(1000 as i32 as u64)))
                {
                    return 0;
                }
                key &= 0xfffffffffff as u64;
            } else {
                key &= if key & KEYC_VI0000 as u64 != 0 {
                    0x1f as i32 as u64
                } else {
                    0xfffffffffff as u64
                };
            }
            (unsafe { (*c).prompt_flags &= !(0x40 as i32) });
            current_block = 7173793139323517425;
        } else {
            keys = (unsafe {
                options_get_number(
                    (*(*c).session).options,
                    b"status-keys\0" as *const u8 as *const i8,
                )
            }) as i32;
            if keys == 1 {
                match status_prompt_translate_key(c, key, &mut key) {
                    1 => {
                        current_block = 3729423749117299507;
                    }
                    2 => {
                        current_block = 7173793139323517425;
                    }
                    _ => return 0,
                }
            } else {
                current_block = 3729423749117299507;
            }
            match current_block {
                7173793139323517425 => {}
                _ => match key {
                    1106544 | 35184372088930 => {
                        current_block = 17423368949944597783;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106545 | 35184372088934 => {
                        current_block = 4116089576692000574;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106537 | 35184372088929 => {
                        current_block = 12765542112686674379;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106538 | 35184372088933 => {
                        current_block = 10208804563709482574;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9 => {
                        current_block = 8017791457021321391;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106522 | 35184372088936 => {
                        current_block = 17409361301422033855;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106536 | 35184372088932 => {
                        current_block = 10203206160060979368;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088949 => {
                        current_block = 1465123260891224474;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088939 => {
                        current_block = 3630114903505176012;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088951 => {
                        current_block = 3334602948526645343;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184373195377 | 17592186044518 => {
                        current_block = 18392348048808250851;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9007199254741061 => {
                        current_block = 7753731955988100757;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9007199254741093 => {
                        current_block = 15855513180251742894;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9007199254741079 => {
                        current_block = 6806931495364747720;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9007199254741111 => {
                        current_block = 4072428088283751413;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    9007199254741058 => {
                        current_block = 14133425553303419028;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184373195376 | 17592186044514 => {
                        current_block = 13378914712499404580;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106542 | 35184372088944 => {
                        current_block = 3203625003628430906;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    1106543 | 35184372088942 => {
                        current_block = 13776434095799694680;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088953 => {
                        current_block = 1061500426041963235;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088948 => {
                        current_block = 9893121735833177420;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    13 | 10 => {
                        current_block = 1540791153074256048;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    27 | 35184372088931 | 35184372088935 => {
                        current_block = 11634030214995089741;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088946 => {
                        current_block = 11376657657079690680;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088947 => {
                        current_block = 170232041813141584;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    35184372088950 => {
                        current_block = 18169099900438651441;
                        match current_block {
                            18169099900438651441 => {
                                (unsafe { (*c).prompt_flags |= 0x40 as i32 });
                                current_block = 2842329915678116242;
                            }
                            9893121735833177420 => {
                                idx = unsafe { (*c).prompt_index };
                                if idx < size {
                                    idx = idx.wrapping_add(1);
                                }
                                if idx >= 2 as u64 {
                                    (unsafe {
                                        utf8_copy(
                                            &mut tmp,
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(2 as i32 as u64) as isize),
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                        )
                                    });
                                    (unsafe {
                                        utf8_copy(
                                            &mut *((*c).prompt_buffer)
                                                .offset(idx.wrapping_sub(1 as i32 as u64) as isize),
                                            &mut tmp,
                                        )
                                    });
                                    (unsafe { (*c).prompt_index = idx });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            13776434095799694680 => {
                                histstr = status_prompt_down_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            3203625003628430906 => {
                                histstr = status_prompt_up_history(
                                    unsafe { ((*c).prompt_hindex).as_mut_ptr() },
                                    (unsafe { (*c).prompt_type }) as u_int,
                                );
                                if histstr.is_null() {
                                    current_block = 2842329915678116242;
                                } else {
                                    (unsafe { free((*c).prompt_buffer as *mut ()) });
                                    (unsafe { (*c).prompt_buffer = utf8_fromcstr(histstr) });
                                    (unsafe {
                                        (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                    });
                                    current_block = 11242389212163057493;
                                }
                            }
                            13378914712499404580 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_backward_word(c, separators);
                                current_block = 11242389212163057493;
                            }
                            4072428088283751413 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 1, separators);
                                current_block = 11242389212163057493;
                            }
                            15855513180251742894 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_end_word(c, size, separators);
                                current_block = 11242389212163057493;
                            }
                            18392348048808250851 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                status_prompt_forward_word(c, size, 0, separators);
                                current_block = 11242389212163057493;
                            }
                            3334602948526645343 => {
                                separators = unsafe {
                                    options_get_string(
                                        oo,
                                        b"word-separators\0" as *const u8 as *const i8,
                                    )
                                };
                                idx = unsafe { (*c).prompt_index };
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) == 0
                                    {
                                        break;
                                    }
                                }
                                word_is_separators = status_prompt_in_list(separators, unsafe {
                                    &mut *((*c).prompt_buffer).offset(idx as isize)
                                });
                                while idx != 0 as u64 {
                                    idx = idx.wrapping_sub(1);
                                    if !(status_prompt_space(unsafe {
                                        &mut *((*c).prompt_buffer).offset(idx as isize)
                                    }) != 0
                                        || word_is_separators
                                            != status_prompt_in_list(separators, unsafe {
                                                &mut *((*c).prompt_buffer).offset(idx as isize)
                                            }))
                                    {
                                        continue;
                                    }
                                    idx = idx.wrapping_add(1);
                                    break;
                                }
                                (unsafe { free((*c).prompt_saved as *mut ()) });
                                (unsafe {
                                    (*c).prompt_saved = xcalloc(
                                        ::core::mem::size_of::<utf8_data>() as u64,
                                        ((*c).prompt_index)
                                            .wrapping_sub(idx)
                                            .wrapping_add(1 as i32 as u64),
                                    )
                                        as *mut utf8_data
                                });
                                (unsafe {
                                    memcpy(
                                        (*c).prompt_saved as *mut (),
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *const (),
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe {
                                    memmove(
                                        ((*c).prompt_buffer).offset(idx as isize)
                                            as *mut (),
                                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                            as *const (),
                                        size.wrapping_add(1 as i32 as u64)
                                            .wrapping_sub((*c).prompt_index)
                                            .wrapping_mul(
                                                ::core::mem::size_of::<utf8_data>() as u64
                                            ),
                                    )
                                });
                                (unsafe {
                                    memset(
                                        ((*c).prompt_buffer).offset(size as isize).offset(
                                            -(((*c).prompt_index).wrapping_sub(idx) as isize),
                                        )
                                            as *mut (),
                                        '\0' as i32,
                                        ((*c).prompt_index).wrapping_sub(idx).wrapping_mul(
                                            ::core::mem::size_of::<utf8_data>() as u64,
                                        ),
                                    )
                                });
                                (unsafe { (*c).prompt_index = idx });
                                current_block = 11242389212163057493;
                            }
                            3630114903505176012 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*((*c).prompt_buffer).offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            1465123260891224474 => {
                                (unsafe {
                                    (*((*c).prompt_buffer).offset(0 as i32 as isize)).size = 0 as u_char
                                });
                                (unsafe { (*c).prompt_index = 0 as size_t });
                                current_block = 11242389212163057493;
                            }
                            10203206160060979368 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe {
                                        memmove(
                                            ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                                                as *mut (),
                                            ((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize)
                                                .offset(1 as i32 as isize)
                                                as *const (),
                                            size.wrapping_add(1 as i32 as u64)
                                                .wrapping_sub((*c).prompt_index)
                                                .wrapping_mul(
                                                    ::core::mem::size_of::<utf8_data>() as u64
                                                ),
                                        )
                                    });
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17409361301422033855 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    if (unsafe { (*c).prompt_index }) == size {
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                        (unsafe {
                                            (*((*c).prompt_buffer)
                                                .offset((*c).prompt_index as isize))
                                            .size = 0 as u_char
                                        });
                                    } else {
                                        (unsafe {
                                            memmove(
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    .offset(-(1 as i32 as isize))
                                                    as *mut (),
                                                ((*c).prompt_buffer)
                                                    .offset((*c).prompt_index as isize)
                                                    as *const (),
                                                size.wrapping_add(1 as i32 as u64)
                                                    .wrapping_sub((*c).prompt_index)
                                                    .wrapping_mul(
                                                        ::core::mem::size_of::<utf8_data>() as u64,
                                                    ),
                                            )
                                        });
                                        (unsafe {
                                            (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                        });
                                    }
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            10208804563709482574 => {
                                if (unsafe { (*c).prompt_index }) != size {
                                    (unsafe { (*c).prompt_index = size });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            12765542112686674379 => {
                                if (unsafe { (*c).prompt_index }) != 0 as u64 {
                                    (unsafe { (*c).prompt_index = 0 as size_t });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            4116089576692000574 => {
                                if (unsafe { (*c).prompt_index }) < size {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_add(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            17423368949944597783 => {
                                if (unsafe { (*c).prompt_index }) > 0 as u64 {
                                    (unsafe {
                                        (*c).prompt_index = ((*c).prompt_index).wrapping_sub(1)
                                    });
                                    current_block = 2842329915678116242;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11376657657079690680 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '-' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            170232041813141584 => {
                                if !(unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
                                    current_block = 2842329915678116242;
                                } else {
                                    if (unsafe {
                                        (*((*c).prompt_buffer).offset(0 as i32 as isize)).size
                                    }) as i32
                                        == 0
                                    {
                                        prefix = '=' as i32 as i8;
                                        (unsafe { free((*c).prompt_buffer as *mut ()) });
                                        (unsafe {
                                            (*c).prompt_buffer = utf8_fromcstr((*c).prompt_last)
                                        });
                                        (unsafe {
                                            (*c).prompt_index = utf8_strlen((*c).prompt_buffer)
                                        });
                                    } else {
                                        prefix = '+' as i32 as i8;
                                    }
                                    current_block = 11242389212163057493;
                                }
                            }
                            8017791457021321391 => {
                                if status_prompt_replace_complete(c, std::ptr::null::<i8>()) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            7753731955988100757 => {
                                status_prompt_end_word(c, size, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            6806931495364747720 => {
                                status_prompt_forward_word(
                                    c,
                                    size, 1,
                                    b"\0" as *const u8 as *const i8,
                                );
                                current_block = 11242389212163057493;
                            }
                            14133425553303419028 => {
                                status_prompt_backward_word(c, b"\0" as *const u8 as *const i8);
                                current_block = 11242389212163057493;
                            }
                            1061500426041963235 => {
                                if status_prompt_paste(c) != 0 {
                                    current_block = 11242389212163057493;
                                } else {
                                    current_block = 2842329915678116242;
                                }
                            }
                            11634030214995089741 => {
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        std::ptr::null::<i8>(), 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                current_block = 2842329915678116242;
                            }
                            _ => {
                                s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                                if (unsafe { *s }) as i32 != '\0' as i32 {
                                    status_prompt_add_history(
                                        s,
                                        (unsafe { (*c).prompt_type }) as u_int,
                                    );
                                }
                                if (unsafe {
                                    ((*c).prompt_inputcb).expect("non-null function pointer")(
                                        c,
                                        (*c).prompt_data,
                                        s, 1,
                                    )
                                }) == 0
                                {
                                    status_prompt_clear(c);
                                }
                                (unsafe { free(s as *mut ()) });
                                current_block = 2842329915678116242;
                            }
                        }
                        match current_block {
                            11242389212163057493 => {}
                            _ => {
                                (unsafe { (*c).flags |= 0x10 as i32 as u64 });
                                return 0;
                            }
                        }
                    }
                    _ => {
                        current_block = 7173793139323517425;
                    }
                },
            }
        }
    }
    match current_block {
        7173793139323517425 => {
            if key <= 0x7f as i32 as u64 {
                (unsafe { utf8_set(&mut tmp, key as u_char) });
                if key <= 0x1f as i32 as u64 || key == 0x7f as i32 as u64 {
                    tmp.width = 2 as u_char;
                }
            } else if key & 0xfffffffffff as u64 > 0x7f as i32 as u64
                && ((key & 0xfffffffffff as u64) < 0x10e000 as u64
                    || key & 0xfffffffffff as u64 >= KEYC_BASE_END as i32 as u64)
                && ((key & 0xfffffffffff as u64) < 0x10f000 as u64
                    || key & 0xfffffffffff as u64
                        >= (0x10f000 as u64).wrapping_add(1000 as i32 as u64))
            {
                (unsafe { utf8_to_data(key as utf8_char, &mut tmp) });
            } else {
                return 0;
            }
            (unsafe {
                (*c).prompt_buffer = xreallocarray(
                    (*c).prompt_buffer as *mut (),
                    size.wrapping_add(2 as i32 as u64),
                    ::core::mem::size_of::<utf8_data>() as u64,
                ) as *mut utf8_data
            });
            if (unsafe { (*c).prompt_index }) == size {
                (unsafe {
                    utf8_copy(
                        &mut *((*c).prompt_buffer).offset((*c).prompt_index as isize),
                        &mut tmp,
                    )
                });
                (unsafe { (*c).prompt_index = ((*c).prompt_index).wrapping_add(1) });
                (unsafe {
                    (*((*c).prompt_buffer).offset((*c).prompt_index as isize)).size = 0 as u_char
                });
            } else {
                (unsafe {
                    memmove(
                        ((*c).prompt_buffer)
                            .offset((*c).prompt_index as isize)
                            .offset(1 as i32 as isize) as *mut (),
                        ((*c).prompt_buffer).offset((*c).prompt_index as isize)
                            as *const (),
                        size.wrapping_add(1 as i32 as u64)
                            .wrapping_sub((*c).prompt_index)
                            .wrapping_mul(::core::mem::size_of::<utf8_data>() as u64),
                    )
                });
                (unsafe {
                    utf8_copy(
                        &mut *((*c).prompt_buffer).offset((*c).prompt_index as isize),
                        &mut tmp,
                    )
                });
                (unsafe { (*c).prompt_index = ((*c).prompt_index).wrapping_add(1) });
            }
            if (unsafe { (*c).prompt_flags }) & 0x1 as i32 != 0 {
                if (unsafe { utf8_strlen((*c).prompt_buffer) }) != 1 as u64 {
                    status_prompt_clear(c);
                } else {
                    s = unsafe { utf8_tocstr((*c).prompt_buffer) };
                    if (unsafe {
                        ((*c).prompt_inputcb).expect("non-null function pointer")(
                            c,
                            (*c).prompt_data,
                            s, 1,
                        )
                    }) == 0
                    {
                        status_prompt_clear(c);
                    }
                    (unsafe { free(s as *mut ()) });
                }
            }
        }
        _ => {}
    }
    (unsafe { (*c).flags |= 0x10 as i32 as u64 });
    if (unsafe { (*c).prompt_flags }) & 0x4 as i32 != 0 {
        s = unsafe { utf8_tocstr((*c).prompt_buffer) };
        (unsafe {
            xasprintf(
                &mut cp as *mut *mut i8,
                b"%c%s\0" as *const u8 as *const i8,
                prefix as i32,
                s,
            )
        });
        (unsafe {
            ((*c).prompt_inputcb).expect("non-null function pointer")(
                c,
                (*c).prompt_data,
                cp, 0,
            )
        });
        (unsafe { free(cp as *mut ()) });
        (unsafe { free(s as *mut ()) });
    }
    return 0;
}
extern "C" fn status_prompt_up_history(mut idx: *mut u_int, mut type_0: u_int) -> *const i8 {
    if (unsafe { status_prompt_hsize[type_0 as usize] }) == 0 as u32
        || (unsafe { *idx.offset(type_0 as isize) })
            == (unsafe { status_prompt_hsize[type_0 as usize] })
    {
        return std::ptr::null::<i8>();
    }
    let fresh0 = unsafe { &mut (*idx.offset(type_0 as isize)) };
    *fresh0 = (*fresh0).wrapping_add(1);
    return unsafe {
        *(status_prompt_hlist[type_0 as usize]).offset(
            (status_prompt_hsize[type_0 as usize]).wrapping_sub(*idx.offset(type_0 as isize))
                as isize,
        )
    };
}
extern "C" fn status_prompt_down_history(mut idx: *mut u_int, mut type_0: u_int) -> *const i8 {
    if (unsafe { status_prompt_hsize[type_0 as usize] }) == 0 as u32
        || (unsafe { *idx.offset(type_0 as isize) }) == 0 as u32
    {
        return b"\0" as *const u8 as *const i8;
    }
    let fresh1 = unsafe { &mut (*idx.offset(type_0 as isize)) };
    *fresh1 = (*fresh1).wrapping_sub(1);
    if (unsafe { *idx.offset(type_0 as isize) }) == 0 as u32 {
        return b"\0" as *const u8 as *const i8;
    }
    return unsafe {
        *(status_prompt_hlist[type_0 as usize]).offset(
            (status_prompt_hsize[type_0 as usize]).wrapping_sub(*idx.offset(type_0 as isize))
                as isize,
        )
    };
}
extern "C" fn status_prompt_add_history(mut line: *const i8, mut type_0: u_int) {
    let mut i: u_int = 0;
    let mut oldsize: u_int = 0;
    let mut newsize: u_int = 0;
    let mut freecount: u_int = 0;
    let mut hlimit: u_int = 0;
    let mut new: u_int = 1 as u_int;
    let mut movesize: size_t = 0;
    oldsize = unsafe { status_prompt_hsize[type_0 as usize] };
    if oldsize > 0 as u32
        && (unsafe {
            strcmp(
                *(status_prompt_hlist[type_0 as usize])
                    .offset(oldsize.wrapping_sub(1 as i32 as u32) as isize),
                line,
            )
        }) == 0
    {
        new = 0 as u_int;
    }
    hlimit = (unsafe {
        options_get_number(
            global_options,
            b"prompt-history-limit\0" as *const u8 as *const i8,
        )
    }) as u_int;
    if hlimit > oldsize {
        if new == 0 as u32 {
            return;
        }
        newsize = oldsize.wrapping_add(new);
    } else {
        newsize = hlimit;
        freecount = oldsize.wrapping_add(new).wrapping_sub(newsize);
        if freecount > oldsize {
            freecount = oldsize;
        }
        if freecount == 0 as u32 {
            return;
        }
        i = 0 as u_int;
        while i < freecount {
            (unsafe {
                free(*(status_prompt_hlist[type_0 as usize]).offset(i as isize) as *mut ())
            });
            i = i.wrapping_add(1);
        }
        movesize = (oldsize.wrapping_sub(freecount) as u64)
            .wrapping_mul(::core::mem::size_of::<*mut i8>() as u64);
        if movesize > 0 as u64 {
            (unsafe {
                memmove(
                    &mut *(*status_prompt_hlist.as_mut_ptr().offset(type_0 as isize))
                        .offset(0 as i32 as isize) as *mut *mut i8
                        as *mut (),
                    &mut *(*status_prompt_hlist.as_mut_ptr().offset(type_0 as isize))
                        .offset(freecount as isize) as *mut *mut i8
                        as *const (),
                    movesize,
                )
            });
        }
    }
    if newsize == 0 as u32 {
        (unsafe { free(status_prompt_hlist[type_0 as usize] as *mut ()) });
        (unsafe { status_prompt_hlist[type_0 as usize] = std::ptr::null_mut::<*mut i8>() });
    } else if newsize != oldsize {
        (unsafe {
            status_prompt_hlist[type_0 as usize] = xreallocarray(
                status_prompt_hlist[type_0 as usize] as *mut (),
                newsize as size_t,
                ::core::mem::size_of::<*mut i8>() as u64,
            ) as *mut *mut i8
        });
    }
    if new == 1 as u32 && newsize > 0 as u32 {
        let fresh2 = unsafe {
            &mut (*(status_prompt_hlist[type_0 as usize])
                .offset(newsize.wrapping_sub(1 as i32 as u32) as isize))
        };
        *fresh2 = unsafe { xstrdup(line) };
    }
    (unsafe { status_prompt_hsize[type_0 as usize] = newsize });
}
extern "C" fn status_prompt_add_list(
    mut list: *mut *mut *mut i8,
    mut size: *mut u_int,
    mut s: *const i8,
) {
    let mut i: u_int = 0;
    i = 0 as u_int;
    while i < (unsafe { *size }) {
        if (unsafe { strcmp(*(*list).offset(i as isize), s) }) == 0 {
            return;
        }
        i = i.wrapping_add(1);
    }
    (unsafe {
        *list = xreallocarray(
            *list as *mut (),
            (*size).wrapping_add(1 as i32 as u32) as size_t,
            ::core::mem::size_of::<*mut i8>() as u64,
        ) as *mut *mut i8
    });
    let fresh3 = unsafe { *size };
    (unsafe { *size = (*size).wrapping_add(1) });
    let fresh4 = unsafe { &mut (*(*list).offset(fresh3 as isize)) };
    *fresh4 = unsafe { xstrdup(s) };
}
extern "C" fn status_prompt_complete_list(
    mut size: *mut u_int,
    mut s: *const i8,
    mut at_start: i32,
) -> *mut *mut i8 {
    let mut list: *mut *mut i8 = std::ptr::null_mut::<*mut i8>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut layout: *mut *const i8 = std::ptr::null_mut::<*const i8>();
    let mut value: *const i8 = std::ptr::null::<i8>();
    let mut cp: *const i8 = std::ptr::null::<i8>();
    let mut cmdent: *mut *const cmd_entry = std::ptr::null_mut::<*const cmd_entry>();
    let mut oe: *const options_table_entry = std::ptr::null::<options_table_entry>();
    let mut slen: size_t = unsafe { strlen(s) };
    let mut valuelen: size_t = 0;
    let mut o: *mut options_entry = std::ptr::null_mut::<options_entry>();
    let mut a: *mut options_array_item = std::ptr::null_mut::<options_array_item>();
    let mut layouts: [*const i8; 8] = [
        b"even-horizontal\0" as *const u8 as *const i8,
        b"even-vertical\0" as *const u8 as *const i8,
        b"main-horizontal\0" as *const u8 as *const i8,
        b"main-horizontal-mirrored\0" as *const u8 as *const i8,
        b"main-vertical\0" as *const u8 as *const i8,
        b"main-vertical-mirrored\0" as *const u8 as *const i8,
        b"tiled\0" as *const u8 as *const i8,
        std::ptr::null::<i8>(),
    ];
    (unsafe { *size = 0 as u_int });
    cmdent = unsafe { cmd_table.as_mut_ptr() };
    while !(unsafe { *cmdent }).is_null() {
        if (unsafe { strncmp((**cmdent).name, s, slen) }) == 0 {
            status_prompt_add_list(&mut list, size, unsafe { (**cmdent).name });
        }
        if !(unsafe { (**cmdent).alias }).is_null()
            && (unsafe { strncmp((**cmdent).alias, s, slen) }) == 0
        {
            status_prompt_add_list(&mut list, size, unsafe { (**cmdent).alias });
        }
        cmdent = unsafe { cmdent.offset(1) };
    }
    o = unsafe { options_get_only(global_options, b"command-alias\0" as *const u8 as *const i8) };
    if !o.is_null() {
        a = unsafe { options_array_first(o) };
        while !a.is_null() {
            value = unsafe { (*options_array_item_value(a)).string };
            cp = unsafe { strchr(value, '=' as i32) };
            if !cp.is_null() {
                valuelen = (unsafe { cp.offset_from(value) }) as i64 as size_t;
                if !(slen > valuelen || (unsafe { strncmp(value, s, slen) }) != 0) {
                    (unsafe {
                        xasprintf(
                            &mut tmp as *mut *mut i8,
                            b"%.*s\0" as *const u8 as *const i8,
                            valuelen as i32,
                            value,
                        )
                    });
                    status_prompt_add_list(&mut list, size, tmp);
                    (unsafe { free(tmp as *mut ()) });
                }
            }
            a = unsafe { options_array_next(a) };
        }
    }
    if at_start != 0 {
        return list;
    }
    oe = unsafe { options_table.as_ptr() };
    while !(unsafe { (*oe).name }).is_null() {
        if (unsafe { strncmp((*oe).name, s, slen) }) == 0 {
            status_prompt_add_list(&mut list, size, unsafe { (*oe).name });
        }
        oe = unsafe { oe.offset(1) };
    }
    layout = layouts.as_mut_ptr();
    while !(unsafe { *layout }).is_null() {
        if (unsafe { strncmp(*layout, s, slen) }) == 0 {
            status_prompt_add_list(&mut list, size, unsafe { *layout });
        }
        layout = unsafe { layout.offset(1) };
    }
    return list;
}
extern "C" fn status_prompt_complete_prefix(mut list: *mut *mut i8, mut size: u_int) -> *mut i8 {
    let mut out: *mut i8 = std::ptr::null_mut::<i8>();
    let mut i: u_int = 0;
    let mut j: size_t = 0;
    if list.is_null() || size == 0 as u32 {
        return std::ptr::null_mut::<i8>();
    }
    out = unsafe { xstrdup(*list.offset(0 as i32 as isize)) };
    i = 1 as u_int;
    while i < size {
        j = unsafe { strlen(*list.offset(i as isize)) };
        if j > (unsafe { strlen(out) }) {
            j = unsafe { strlen(out) };
        }
        while j > 0 as u64 {
            if (unsafe { *out.offset(j.wrapping_sub(1 as i32 as u64) as isize) }) as i32
                != (unsafe {
                    *(*list.offset(i as isize)).offset(j.wrapping_sub(1 as i32 as u64) as isize)
                }) as i32
            {
                (unsafe {
                    *out.offset(j.wrapping_sub(1 as i32 as u64) as isize) = '\0' as i32 as i8
                });
            }
            j = j.wrapping_sub(1);
        }
        i = i.wrapping_add(1);
    }
    return out;
}
extern "C" fn status_prompt_menu_callback(
    mut _menu: *mut menu,
    mut idx: u_int,
    mut key: key_code,
    mut data: *mut (),
) {
    let mut spm: *mut status_prompt_menu = data as *mut status_prompt_menu;
    let mut c: *mut client = unsafe { (*spm).c };
    let mut i: u_int = 0;
    let mut s: *mut i8 = std::ptr::null_mut::<i8>();
    if key != KEYC_MASK_FLAGS000 as u64 {
        idx = (idx as u32).wrapping_add(unsafe { (*spm).start }) as u_int as u_int;
        if (unsafe { (*spm).flag }) as i32 == '\0' as i32 {
            s = unsafe { xstrdup(*((*spm).list).offset(idx as isize)) };
        } else {
            (unsafe {
                xasprintf(
                    &mut s as *mut *mut i8,
                    b"-%c%s\0" as *const u8 as *const i8,
                    (*spm).flag as i32,
                    *((*spm).list).offset(idx as isize),
                )
            });
        }
        if (unsafe { (*c).prompt_type }) as u32 == PROMPT_TYPE_WINDOW_TARGET as i32 as u32 {
            (unsafe { free((*c).prompt_buffer as *mut ()) });
            (unsafe { (*c).prompt_buffer = utf8_fromcstr(s) });
            (unsafe { (*c).prompt_index = utf8_strlen((*c).prompt_buffer) });
            (unsafe { (*c).flags |= 0x10 as i32 as u64 });
        } else if status_prompt_replace_complete(c, s) != 0 {
            (unsafe { (*c).flags |= 0x10 as i32 as u64 });
        }
        (unsafe { free(s as *mut ()) });
    }
    i = 0 as u_int;
    while i < (unsafe { (*spm).size }) {
        (unsafe { free(*((*spm).list).offset(i as isize) as *mut ()) });
        i = i.wrapping_add(1);
    }
    (unsafe { free((*spm).list as *mut ()) });
}
extern "C" fn status_prompt_complete_list_menu(
    mut c: *mut client,
    mut list: *mut *mut i8,
    mut size: u_int,
    mut offset: u_int,
    mut flag: i8,
) -> i32 {
    let mut menu: *mut menu = std::ptr::null_mut::<menu>();
    let mut item: menu_item = menu_item {
        name: std::ptr::null::<i8>(),
        key: 0,
        command: std::ptr::null::<i8>(),
    };
    let mut spm: *mut status_prompt_menu = std::ptr::null_mut::<status_prompt_menu>();
    let mut lines: u_int = status_line_size(c);
    let mut height: u_int = 0;
    let mut i: u_int = 0;
    let mut py: u_int = 0;
    if size <= 1 as u32 {
        return 0;
    }
    if (unsafe { (*c).tty.sy }).wrapping_sub(lines) < 3 as u32 {
        return 0;
    }
    spm = (unsafe { xmalloc(::core::mem::size_of::<status_prompt_menu>() as u64) })
        as *mut status_prompt_menu;
    (unsafe { (*spm).c = c });
    (unsafe { (*spm).size = size });
    (unsafe { (*spm).list = list });
    (unsafe { (*spm).flag = flag });
    height = (unsafe { (*c).tty.sy })
        .wrapping_sub(lines)
        .wrapping_sub(2 as i32 as u32);
    if height > 10 as u32 {
        height = 10 as u_int;
    }
    if height > size {
        height = size;
    }
    (unsafe { (*spm).start = size.wrapping_sub(height) });
    menu = unsafe { menu_create(b"\0" as *const u8 as *const i8) };
    i = unsafe { (*spm).start };
    while i < size {
        item.name = unsafe { *list.offset(i as isize) };
        item.key =
            ('0' as i32 as u32).wrapping_add(i.wrapping_sub(unsafe { (*spm).start })) as key_code;
        item.command = std::ptr::null::<i8>();
        (unsafe {
            menu_add_item(
                menu,
                &mut item,
                std::ptr::null_mut::<cmdq_item>(),
                c,
                std::ptr::null_mut::<cmd_find_state>(),
            )
        });
        i = i.wrapping_add(1);
    }
    if (unsafe {
        options_get_number(
            (*(*c).session).options,
            b"status-position\0" as *const u8 as *const i8,
        )
    }) == 0 as i64
    {
        py = lines;
    } else {
        py = (unsafe { (*c).tty.sy })
            .wrapping_sub(3 as i32 as u32)
            .wrapping_sub(height);
    }
    offset = (offset as u32).wrapping_add(unsafe { utf8_cstrwidth((*c).prompt_string) }) as u_int
        as u_int;
    if offset > 2 as u32 {
        offset = (offset as u32).wrapping_sub(2 as i32 as u32) as u_int as u_int;
    } else {
        offset = 0 as u_int;
    }
    if (unsafe {
        menu_display(
            menu,
            0x1 as i32 | 0x2 as i32, 0,
            std::ptr::null_mut::<cmdq_item>(),
            offset,
            py,
            c,
            BOX_LINES_DEFAULT,
            std::ptr::null::<i8>(),
            std::ptr::null::<i8>(),
            std::ptr::null::<i8>(),
            std::ptr::null_mut::<cmd_find_state>(),
            Some(
                status_prompt_menu_callback
                    as unsafe extern "C" fn(*mut menu, u_int, key_code, *mut ()) -> (),
            ),
            spm as *mut (),
        )
    }) != 0
    {
        (unsafe { menu_free(menu) });
        (unsafe { free(spm as *mut ()) });
        return 0;
    }
    return 1;
}
extern "C" fn status_prompt_complete_window_menu(
    mut c: *mut client,
    mut s: *mut session,
    mut word: *const i8,
    mut offset: u_int,
    mut flag: i8,
) -> *mut i8 {
    let mut menu: *mut menu = std::ptr::null_mut::<menu>();
    let mut item: menu_item = menu_item {
        name: std::ptr::null::<i8>(),
        key: 0,
        command: std::ptr::null::<i8>(),
    };
    let mut spm: *mut status_prompt_menu = std::ptr::null_mut::<status_prompt_menu>();
    let mut wl: *mut winlink = std::ptr::null_mut::<winlink>();
    let mut list: *mut *mut i8 = std::ptr::null_mut::<*mut i8>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut lines: u_int = status_line_size(c);
    let mut height: u_int = 0;
    let mut py: u_int = 0;
    let mut size: u_int = 0 as u_int;
    if (unsafe { (*c).tty.sy }).wrapping_sub(lines) < 3 as u32 {
        return std::ptr::null_mut::<i8>();
    }
    spm = (unsafe { xmalloc(::core::mem::size_of::<status_prompt_menu>() as u64) })
        as *mut status_prompt_menu;
    (unsafe { (*spm).c = c });
    (unsafe { (*spm).flag = flag });
    height = (unsafe { (*c).tty.sy })
        .wrapping_sub(lines)
        .wrapping_sub(2 as i32 as u32);
    if height > 10 as u32 {
        height = 10 as u_int;
    }
    (unsafe { (*spm).start = 0 as u_int });
    menu = unsafe { menu_create(b"\0" as *const u8 as *const i8) };
    let mut current_block_26: u64;
    wl = unsafe { winlinks_RB_MINMAX(&mut (*s).windows, -(1 as i32)) };
    while !wl.is_null() {
        if !word.is_null() && (unsafe { *word }) as i32 != '\0' as i32 {
            (unsafe {
                xasprintf(
                    &mut tmp as *mut *mut i8,
                    b"%d\0" as *const u8 as *const i8,
                    (*wl).idx,
                )
            });
            if (unsafe { strncmp(tmp, word, strlen(word)) }) != 0 {
                (unsafe { free(tmp as *mut ()) });
                current_block_26 = 11812396948646013369;
            } else {
                (unsafe { free(tmp as *mut ()) });
                current_block_26 = 17407779659766490442;
            }
        } else {
            current_block_26 = 17407779659766490442;
        }
        match current_block_26 {
            17407779659766490442 => {
                list = (unsafe {
                    xreallocarray(
                        list as *mut (),
                        size.wrapping_add(1 as i32 as u32) as size_t,
                        ::core::mem::size_of::<*mut i8>() as u64,
                    )
                }) as *mut *mut i8;
                if (unsafe { (*c).prompt_type }) as u32 == PROMPT_TYPE_WINDOW_TARGET as i32 as u32 {
                    (unsafe {
                        xasprintf(
                            &mut tmp as *mut *mut i8,
                            b"%d (%s)\0" as *const u8 as *const i8,
                            (*wl).idx,
                            (*(*wl).window).name,
                        )
                    });
                    let fresh5 = size;
                    size = size.wrapping_add(1);
                    (unsafe {
                        xasprintf(
                            &mut *list.offset(fresh5 as isize) as *mut *mut i8,
                            b"%d\0" as *const u8 as *const i8,
                            (*wl).idx,
                        )
                    });
                } else {
                    (unsafe {
                        xasprintf(
                            &mut tmp as *mut *mut i8,
                            b"%s:%d (%s)\0" as *const u8 as *const i8,
                            (*s).name,
                            (*wl).idx,
                            (*(*wl).window).name,
                        )
                    });
                    let fresh6 = size;
                    size = size.wrapping_add(1);
                    (unsafe {
                        xasprintf(
                            &mut *list.offset(fresh6 as isize) as *mut *mut i8,
                            b"%s:%d\0" as *const u8 as *const i8,
                            (*s).name,
                            (*wl).idx,
                        )
                    });
                }
                item.name = tmp;
                item.key = ('0' as i32 as u32)
                    .wrapping_add(size)
                    .wrapping_sub(1 as i32 as u32) as key_code;
                item.command = std::ptr::null::<i8>();
                (unsafe {
                    menu_add_item(
                        menu,
                        &mut item,
                        std::ptr::null_mut::<cmdq_item>(),
                        c,
                        std::ptr::null_mut::<cmd_find_state>(),
                    )
                });
                (unsafe { free(tmp as *mut ()) });
                if size == height {
                    break;
                }
            }
            _ => {}
        }
        wl = unsafe { winlinks_RB_NEXT(wl) };
    }
    if size == 0 as u32 {
        (unsafe { menu_free(menu) });
        (unsafe { free(spm as *mut ()) });
        return std::ptr::null_mut::<i8>();
    }
    if size == 1 as u32 {
        (unsafe { menu_free(menu) });
        if flag as i32 != '\0' as i32 {
            (unsafe {
                xasprintf(
                    &mut tmp as *mut *mut i8,
                    b"-%c%s\0" as *const u8 as *const i8,
                    flag as i32,
                    *list.offset(0 as i32 as isize),
                )
            });
            (unsafe { free(*list.offset(0 as i32 as isize) as *mut ()) });
        } else {
            tmp = unsafe { *list.offset(0 as i32 as isize) };
        }
        (unsafe { free(list as *mut ()) });
        (unsafe { free(spm as *mut ()) });
        return tmp;
    }
    if height > size {
        height = size;
    }
    (unsafe { (*spm).size = size });
    (unsafe { (*spm).list = list });
    if (unsafe {
        options_get_number(
            (*(*c).session).options,
            b"status-position\0" as *const u8 as *const i8,
        )
    }) == 0 as i64
    {
        py = lines;
    } else {
        py = (unsafe { (*c).tty.sy })
            .wrapping_sub(3 as i32 as u32)
            .wrapping_sub(height);
    }
    offset = (offset as u32).wrapping_add(unsafe { utf8_cstrwidth((*c).prompt_string) }) as u_int
        as u_int;
    if offset > 2 as u32 {
        offset = (offset as u32).wrapping_sub(2 as i32 as u32) as u_int as u_int;
    } else {
        offset = 0 as u_int;
    }
    if (unsafe {
        menu_display(
            menu,
            0x1 as i32 | 0x2 as i32, 0,
            std::ptr::null_mut::<cmdq_item>(),
            offset,
            py,
            c,
            BOX_LINES_DEFAULT,
            std::ptr::null::<i8>(),
            std::ptr::null::<i8>(),
            std::ptr::null::<i8>(),
            std::ptr::null_mut::<cmd_find_state>(),
            Some(
                status_prompt_menu_callback
                    as unsafe extern "C" fn(*mut menu, u_int, key_code, *mut ()) -> (),
            ),
            spm as *mut (),
        )
    }) != 0
    {
        (unsafe { menu_free(menu) });
        (unsafe { free(spm as *mut ()) });
        return std::ptr::null_mut::<i8>();
    }
    return std::ptr::null_mut::<i8>();
}
extern "C" fn status_prompt_complete_sort(
    mut a: *const (),
    mut b: *const (),
) -> i32 {
    let mut aa: *mut *const i8 = a as *mut *const i8;
    let mut bb: *mut *const i8 = b as *mut *const i8;
    return unsafe { strcmp(*aa, *bb) };
}
extern "C" fn status_prompt_complete_session(
    mut list: *mut *mut *mut i8,
    mut size: *mut u_int,
    mut s: *const i8,
    mut flag: i8,
) -> *mut i8 {
    let mut loop_0: *mut session = std::ptr::null_mut::<session>();
    let mut out: *mut i8 = std::ptr::null_mut::<i8>();
    let mut tmp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut n: [i8; 11] = [0; 11];
    loop_0 = unsafe { sessions_RB_MINMAX(&mut sessions, -(1 as i32)) };
    while !loop_0.is_null() {
        if (unsafe { *s }) as i32 == '\0' as i32
            || (unsafe { strncmp((*loop_0).name, s, strlen(s)) }) == 0
        {
            (unsafe {
                *list = xreallocarray(
                    *list as *mut (),
                    (*size).wrapping_add(2 as i32 as u32) as size_t,
                    ::core::mem::size_of::<*mut i8>() as u64,
                ) as *mut *mut i8
            });
            let fresh7 = unsafe { *size };
            (unsafe { *size = (*size).wrapping_add(1) });
            (unsafe {
                xasprintf(
                    &mut *(*list).offset(fresh7 as isize) as *mut *mut i8,
                    b"%s:\0" as *const u8 as *const i8,
                    (*loop_0).name,
                )
            });
        } else if (unsafe { *s }) as i32 == '$' as i32 {
            (unsafe {
                xsnprintf(
                    n.as_mut_ptr(),
                    ::core::mem::size_of::<[i8; 11]>() as u64,
                    b"%u\0" as *const u8 as *const i8,
                    (*loop_0).id,
                )
            });
            if (unsafe { *s.offset(1 as i32 as isize) }) as i32 == '\0' as i32
                || (unsafe {
                    strncmp(
                        n.as_mut_ptr(),
                        s.offset(1 as i32 as isize),
                        (strlen(s)).wrapping_sub(1 as i32 as u64),
                    )
                }) == 0
            {
                (unsafe {
                    *list = xreallocarray(
                        *list as *mut (),
                        (*size).wrapping_add(2 as i32 as u32) as size_t,
                        ::core::mem::size_of::<*mut i8>() as u64,
                    ) as *mut *mut i8
                });
                let fresh8 = unsafe { *size };
                (unsafe { *size = (*size).wrapping_add(1) });
                (unsafe {
                    xasprintf(
                        &mut *(*list).offset(fresh8 as isize) as *mut *mut i8,
                        b"$%s:\0" as *const u8 as *const i8,
                        n.as_mut_ptr(),
                    )
                });
            }
        }
        loop_0 = unsafe { sessions_RB_NEXT(loop_0) };
    }
    out = status_prompt_complete_prefix(unsafe { *list }, unsafe { *size });
    if !out.is_null() && flag as i32 != '\0' as i32 {
        (unsafe {
            xasprintf(
                &mut tmp as *mut *mut i8,
                b"-%c%s\0" as *const u8 as *const i8,
                flag as i32,
                out,
            )
        });
        (unsafe { free(out as *mut ()) });
        out = tmp;
    }
    return out;
}
extern "C" fn status_prompt_complete(
    mut c: *mut client,
    mut word: *const i8,
    mut offset: u_int,
) -> *mut i8 {
    let mut current_block: u64;
    let mut session: *mut session = std::ptr::null_mut::<session>();
    let mut s: *const i8 = std::ptr::null::<i8>();
    let mut colon: *const i8 = std::ptr::null::<i8>();
    let mut list: *mut *mut i8 = std::ptr::null_mut::<*mut i8>();
    let mut copy: *mut i8 = std::ptr::null_mut::<i8>();
    let mut out: *mut i8 = std::ptr::null_mut::<i8>();
    let mut flag: i8 = '\0' as i32 as i8;
    let mut size: u_int = 0 as u_int;
    let mut i: u_int = 0;
    if (unsafe { *word }) as i32 == '\0' as i32
        && (unsafe { (*c).prompt_type }) as u32 != PROMPT_TYPE_TARGET as i32 as u32
        && (unsafe { (*c).prompt_type }) as u32 != PROMPT_TYPE_WINDOW_TARGET as i32 as u32
    {
        return std::ptr::null_mut::<i8>();
    }
    if (unsafe { (*c).prompt_type }) as u32 != PROMPT_TYPE_TARGET as i32 as u32
        && (unsafe { (*c).prompt_type }) as u32 != PROMPT_TYPE_WINDOW_TARGET as i32 as u32
        && (unsafe { strncmp(word, b"-t\0" as *const u8 as *const i8, 2 as u64) })
            != 0
        && (unsafe { strncmp(word, b"-s\0" as *const u8 as *const i8, 2 as u64) })
            != 0
    {
        list = status_prompt_complete_list(&mut size, word, (offset == 0 as u32) as i32);
        if size == 0 as u32 {
            out = std::ptr::null_mut::<i8>();
        } else if size == 1 as u32 {
            (unsafe {
                xasprintf(
                    &mut out as *mut *mut i8,
                    b"%s \0" as *const u8 as *const i8,
                    *list.offset(0 as i32 as isize),
                )
            });
        } else {
            out = status_prompt_complete_prefix(list, size);
        }
    } else {
        if (unsafe { (*c).prompt_type }) as u32 == PROMPT_TYPE_TARGET as i32 as u32
            || (unsafe { (*c).prompt_type }) as u32 == PROMPT_TYPE_WINDOW_TARGET as i32 as u32
        {
            s = word;
            flag = '\0' as i32 as i8;
        } else {
            s = unsafe { word.offset(2 as i32 as isize) };
            flag = unsafe { *word.offset(1 as i32 as isize) };
            offset = (offset as u32).wrapping_add(2 as i32 as u32) as u_int as u_int;
        }
        if (unsafe { (*c).prompt_type }) as u32 == PROMPT_TYPE_WINDOW_TARGET as i32 as u32 {
            out = status_prompt_complete_window_menu(
                c,
                unsafe { (*c).session },
                s,
                offset,
                '\0' as i32 as i8,
            );
        } else {
            colon = unsafe { strchr(s, ':' as i32) };
            if colon.is_null() {
                out = status_prompt_complete_session(&mut list, &mut size, s, flag);
            } else if (unsafe { strchr(colon.offset(1 as i32 as isize), '.' as i32) }).is_null() {
                if (unsafe { *s }) as i32 == ':' as i32 {
                    session = unsafe { (*c).session };
                    current_block = 6669252993407410313;
                } else {
                    copy = unsafe { xstrdup(s) };
                    (unsafe { *strchr(copy, ':' as i32) = '\0' as i32 as i8 });
                    session = unsafe { session_find(copy) };
                    (unsafe { free(copy as *mut ()) });
                    if session.is_null() {
                        current_block = 6616742602321641453;
                    } else {
                        current_block = 6669252993407410313;
                    }
                }
                match current_block {
                    6616742602321641453 => {}
                    _ => {
                        out = status_prompt_complete_window_menu(
                            c,
                            session,
                            unsafe { colon.offset(1 as i32 as isize) },
                            offset,
                            flag,
                        );
                        if out.is_null() {
                            return std::ptr::null_mut::<i8>();
                        }
                    }
                }
            }
        }
    }
    if size != 0 as u32 {
        (unsafe {
            qsort(
                list as *mut (),
                size as size_t,
                ::core::mem::size_of::<*mut i8>() as u64,
                Some(
                    status_prompt_complete_sort
                        as unsafe extern "C" fn(*const (), *const ()) -> i32,
                ),
            )
        });
        i = 0 as u_int;
        while i < size {
            (unsafe {
                log_debug(
                    b"complete %u: %s\0" as *const u8 as *const i8,
                    i,
                    *list.offset(i as isize),
                )
            });
            i = i.wrapping_add(1);
        }
    }
    if !out.is_null() && (unsafe { strcmp(word, out) }) == 0 {
        (unsafe { free(out as *mut ()) });
        out = std::ptr::null_mut::<i8>();
    }
    if !out.is_null() || status_prompt_complete_list_menu(c, list, size, offset, flag) == 0 {
        i = 0 as u_int;
        while i < size {
            (unsafe { free(*list.offset(i as isize) as *mut ()) });
            i = i.wrapping_add(1);
        }
        (unsafe { free(list as *mut ()) });
    }
    return out;
}
#[no_mangle]
pub extern "C" fn status_prompt_type(mut type_0: *const i8) -> prompt_type {
    let mut i: u_int = 0;
    i = 0 as u_int;
    while i < 4 as u32 {
        if (unsafe { strcmp(type_0, status_prompt_type_string(i)) }) == 0 {
            return i as prompt_type;
        }
        i = i.wrapping_add(1);
    }
    return PROMPT_TYPE_INVALID;
}
#[no_mangle]
pub extern "C" fn status_prompt_type_string(mut type_0: u_int) -> *const i8 {
    if type_0 >= 4 as u32 {
        return b"invalid\0" as *const u8 as *const i8;
    }
    return unsafe { prompt_type_strings[type_0 as usize] };
}
